mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
fix: handle user not found errors in user search API
This commit is contained in:
parent
ca592cbbbd
commit
0b489c1970
|
|
@ -46,6 +46,9 @@ func (i *Handler) SearchUser(c *fiber.Ctx) error {
|
|||
|
||||
return api_schema.ErrInternalServerError(nil)
|
||||
}
|
||||
if u == nil {
|
||||
return api_schema.ErrNotFound(nil)
|
||||
}
|
||||
|
||||
return c.JSON((*api_schema.VersiaUser)(u.ToLysand()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue