Update file controllers.go

This commit is contained in:
Mikhail 2024-06-08 17:17:26 +00:00
parent be0feb5342
commit 7f87ba0b62

@ -107,6 +107,9 @@ func (receiver *AccountController) Get(ctx *fiber.Ctx) error {
account, err := receiver.accountRepo.FindByUserID(ctx.Context(), userID)
if err != nil {
if err.Type() == errors.ErrNotFound {
return ctx.Status(fiber.StatusNotFound).String("account not found")
}
return receiver.middleWare.ErrorOld(ctx, err)
}