This commit is contained in:
@@ -48,7 +48,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,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -102,7 +102,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,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -221,7 +221,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,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -258,7 +258,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,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -295,7 +295,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,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ func (m *MediaController) SearchMedia(c fiber.Ctx) error {
|
||||
if err := validator.ValidateQueryDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := m.service.SearchMedia(ctx, dto)
|
||||
@@ -158,7 +158,7 @@ func (m *MediaController) BulkDeleteMedia(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ func (m *MediaController) GeneratePresignedURL(c fiber.Ctx) error {
|
||||
if err := validator.ValidateQueryDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := m.service.GeneratePresignedURL(ctx, c.Locals("uid").(string), dto)
|
||||
@@ -266,7 +266,7 @@ func (m *MediaController) PreSignedCompleted(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := m.service.PreSignedCompleted(ctx, c.Locals("uid").(string), dto)
|
||||
|
||||
@@ -188,7 +188,7 @@ func (h *UserController) UpdateProfile(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ func (h *UserController) ChangePassword(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
err := h.service.ChangePassword(ctx, c.Locals("uid").(string), dto)
|
||||
@@ -318,7 +318,7 @@ func (h *UserController) ChangeRoleUser(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
claimsVal := c.Locals("user_claims")
|
||||
@@ -398,7 +398,7 @@ func (h *UserController) SearchUser(c fiber.Ctx) error {
|
||||
if err := validator.ValidateQueryDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := h.service.SearchUser(ctx, dto)
|
||||
|
||||
@@ -64,7 +64,7 @@ func (m *VerificationController) SearchVerification(c fiber.Ctx) error {
|
||||
if err := validator.ValidateQueryDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := m.service.SearchVerification(ctx, dto)
|
||||
@@ -138,7 +138,7 @@ func (m *VerificationController) CreateVerification(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
res, err := m.service.CreateVerification(ctx, c.Locals("uid").(string), dto)
|
||||
@@ -171,7 +171,7 @@ func (m *VerificationController) UpdateVerificationStatus(c fiber.Ctx) error {
|
||||
if err := validator.ValidateBodyDto(c, dto); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: err.Error(),
|
||||
Errors: err,
|
||||
})
|
||||
}
|
||||
verificationId := c.Params("id")
|
||||
|
||||
Reference in New Issue
Block a user