Изменен статус get, при отсутствии записии вернет 404. В customer добавлено логгирование об ошибке
This commit is contained in:
parent
84aa4d421c
commit
ca791e5c5e
@ -45,7 +45,10 @@ func (c *Customer) UpdateAccountVerification(userId, status string) (*models.Res
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("got bad status: %v | %v", respErr.StatusCode, respErr.Message)
|
||||
err = fmt.Errorf("got bad status: %v | %v", respErr.StatusCode, respErr.Message)
|
||||
c.logger.Error("CustomerUpdateAccountVerification", zap.Error(err))
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &resp, nil
|
||||
|
@ -42,7 +42,7 @@ func (r *VerificationController) GetVerification(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
if resp == nil {
|
||||
return c.SendStatus(fiber.StatusOK)
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
|
||||
return c.Status(fiber.StatusOK).JSON(resp)
|
||||
|
Loading…
Reference in New Issue
Block a user