feat: add cors to fiber app

This commit is contained in:
2025-09-15 20:14:00 +03:30
parent c27e3945d5
commit e3d37a8e4d
5 changed files with 15 additions and 150 deletions
+3 -3
View File
@@ -101,7 +101,7 @@ func (h *AuthHandler) Authenticate(c *fiber.Ctx) error {
// @Success 200 {object} dto.OTPProviderResponse
// @Failure 400 {object} map[string]string
// @Failure 500 {object} map[string]string
// @Router /auth/send-otp [post]
// @Router /auth/otp [post]
func (h *AuthHandler) SendOTP(c *fiber.Ctx) error {
var req dto.OTPProviderReq
if err := c.BodyParser(&req); err != nil {
@@ -132,7 +132,7 @@ func (h *AuthHandler) SendOTP(c *fiber.Ctx) error {
// @Success 200 {object} dto.OTPVerifyResponse
// @Failure 400 {object} map[string]string
// @Failure 401 {object} map[string]string
// @Router /auth/verify-otp [post]
// @Router /auth/otp [post]
func (h *AuthHandler) VerifyOTP(c *fiber.Ctx) error {
var req dto.OTPVerifyRequest
if err := c.BodyParser(&req); err != nil {
@@ -163,7 +163,7 @@ func (h *AuthHandler) VerifyOTP(c *fiber.Ctx) error {
// @Success 200 {object} dto.KYCVerifyResponse
// @Failure 400 {object} map[string]string
// @Failure 500 {object} map[string]string
// @Router /auth/verify-kyc [post]
// @Router /auth/kyc [post]
func (h *AuthHandler) VerifyKYC(c *fiber.Ctx) error {
var req dto.KYCVerifyRequest
if err := c.BodyParser(&req); err != nil {