MCPcopy Create free account
hub / github.com/SwishHQ/spread / GetUser

Method GetUser

src/controller/user_controller.go:45–54  ·  view source on GitHub ↗
(ctx *fiber.Ctx)

Source from the content-addressed store, hash-verified

43}
44
45func (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
56func (c *userController) LoginUser(ctx *fiber.Ctx) error {
57 user := types.LoginUserRequest{}

Callers

nothing calls this directly

Calls 2

ErrorResponseFunction · 0.92
SuccessResponseFunction · 0.92

Tested by

no test coverage detected