GenerateSso function
(ctx *fiber.Ctx)
| 72 | |
| 73 | // GenerateSso function |
| 74 | func (userEndpoint *UserEndpoint) GenerateSso(ctx *fiber.Ctx) error { |
| 75 | me, _ := userEndpoint.CurrentUser(ctx) |
| 76 | ssoUUID, _ := uuid.NewRandom() |
| 77 | inputMap := map[string]string{"sso": ssoUUID.String()} |
| 78 | |
| 79 | updatedUser, err := userService.Update(me.GetID(), me.AccountID, inputMap) |
| 80 | if err != nil { |
| 81 | return ctx.Status(404).JSON(fiber.Map{ |
| 82 | "message": err.Error(), |
| 83 | }) |
| 84 | } |
| 85 | return ctx.JSON(fiber.Map{ |
| 86 | "sso": updatedUser.Sso, |
| 87 | }) |
| 88 | } |
| 89 | |
| 90 | // ByID function |
| 91 | func (userEndpoint *UserEndpoint) ByID(ctx *fiber.Ctx) error { |
nothing calls this directly
no test coverage detected