fix bug
All checks were successful
Build and Release / release (push) Successful in 1m6s

This commit is contained in:
2026-04-19 19:48:12 +07:00
parent 1558cf7001
commit 80f054df63
5 changed files with 59 additions and 26 deletions

View File

@@ -47,7 +47,7 @@ func (h *AuthController) Signin(c fiber.Ctx) error {
if err := validator.ValidateBodyDto(c, dto); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
Status: false,
Status: false,
Errors: err,
})
}
@@ -101,7 +101,7 @@ func (h *AuthController) Signup(c fiber.Ctx) error {
if err := validator.ValidateBodyDto(c, dto); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
Status: false,
Status: false,
Errors: err,
})
}
@@ -220,7 +220,7 @@ func (h *AuthController) VerifyToken(c fiber.Ctx) error {
if err := validator.ValidateBodyDto(c, dto); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
Status: false,
Status: false,
Errors: err,
})
}
@@ -257,7 +257,7 @@ func (h *AuthController) CreateToken(c fiber.Ctx) error {
if err := validator.ValidateBodyDto(c, dto); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
Status: false,
Status: false,
Errors: err,
})
}
@@ -294,7 +294,7 @@ func (h *AuthController) ForgotPassword(c fiber.Ctx) error {
if err := validator.ValidateBodyDto(c, dto); err != nil {
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
Status: false,
Status: false,
Errors: err,
})
}
@@ -438,11 +438,9 @@ func (h *AuthController) GoogleCallback(c fiber.Ctx) error {
})
allowed := map[string]bool{
"http://localhost:3000": true,
"https://localhost:3000": true,
"http://localhost:3001": true,
"https://localhost:3001": true,
"http://localhost:5500": true,
"http://localhost:3000": true,
"http://localhost:3001": true,
"https://history-admin.kain.id.vn": true,
}
feUrl := config.GetConfigWithDefault("FRONTEND_URL", "http://localhost:3000")
redirectURL := data.RedirectURL