generated from PenaSide/GolangTemplate
Update file controllers.go
This commit is contained in:
parent
7f87ba0b62
commit
e59e3b5945
@ -108,7 +108,7 @@ func (receiver *AccountController) Get(ctx *fiber.Ctx) error {
|
|||||||
account, err := receiver.accountRepo.FindByUserID(ctx.Context(), userID)
|
account, err := receiver.accountRepo.FindByUserID(ctx.Context(), userID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err.Type() == errors.ErrNotFound {
|
if err.Type() == errors.ErrNotFound {
|
||||||
return ctx.Status(fiber.StatusNotFound).String("account not found")
|
return receiver.middleWare.Error(ctx, fiber.StatusNotFound, "no account", err)
|
||||||
}
|
}
|
||||||
return receiver.middleWare.ErrorOld(ctx, err)
|
return receiver.middleWare.ErrorOld(ctx, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user