(ctx *fiber.Ctx)
| 43 | } |
| 44 | |
| 45 | func (c *userController) GetUser(ctx *fiber.Ctx) error { |
| 46 | // Get userId from the context |
| 47 | // Get user from context |
| 48 | user := ctx.Locals("user") |
| 49 | if user == nil { |
| 50 | logger.L.Error("In GetUser: User not found in context") |
| 51 | return utils.ErrorResponse(ctx, "User not found") |
| 52 | } |
| 53 | return utils.SuccessResponse(ctx, user) |
| 54 | } |
| 55 | |
| 56 | func (c *userController) LoginUser(ctx *fiber.Ctx) error { |
| 57 | user := types.LoginUserRequest{} |
nothing calls this directly
no test coverage detected