Conditions | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package controllers |
||
30 | func (*UserController) GetMe(c *fiber.Ctx) error { |
||
31 | userCtx, err := GetUserFromContext(c) |
||
32 | if err != nil { |
||
33 | return c.Status(fiber.StatusUnauthorized).JSON(views.NewHTTPResponseVM("User not found", nil)) |
||
34 | } |
||
35 | |||
36 | log.Info("user found", slog.String("user", userCtx.Username)) |
||
37 | return c.Status(fiber.StatusOK).JSON(views.NewHTTPResponseVM("User found", userCtx)) |
||
38 | } |
||
39 |