| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package controllers |
||
| 24 | func (u *UserController) GetMe(c *fiber.Ctx) error { |
||
| 25 | userCtx := utils.GetUserFromContext(c) |
||
| 26 | if userCtx == nil { |
||
| 27 | return c.Status(fiber.StatusUnauthorized).JSON(views.NewHTTPResponseVM("User not found", nil)) |
||
| 28 | } |
||
| 29 | |||
| 30 | return c.Status(fiber.StatusOK).JSON(views.NewHTTPResponseVM("User found", *userCtx)) |
||
| 31 | } |
||
| 32 |