generated from PenaSide/GolangTemplate
Update file controllers.go
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user