forked from baron/baron-sso
패키징 개선
This commit is contained in:
@@ -89,6 +89,26 @@ func (h *WorksmobileHandler) SyncUser(c *fiber.Ctx) error {
|
||||
return c.Status(fiber.StatusAccepted).JSON(job)
|
||||
}
|
||||
|
||||
func (h *WorksmobileHandler) ImportUsersFromWorks(c *fiber.Ctx) error {
|
||||
var req struct {
|
||||
WorksmobileUserIDs []string `json:"worksmobileUserIds"`
|
||||
}
|
||||
if len(c.Body()) > 0 {
|
||||
if err := c.BodyParser(&req); err != nil {
|
||||
return errorJSON(c, fiber.StatusBadRequest, err.Error())
|
||||
}
|
||||
}
|
||||
result, err := h.Service.ImportUsersFromWorks(
|
||||
c.Context(),
|
||||
strings.TrimSpace(c.Params("tenantId")),
|
||||
req.WorksmobileUserIDs,
|
||||
)
|
||||
if err != nil {
|
||||
return worksmobileGuardError(c, err, "import_users_from_works")
|
||||
}
|
||||
return c.JSON(result)
|
||||
}
|
||||
|
||||
func (h *WorksmobileHandler) ResetUserPassword(c *fiber.Ctx) error {
|
||||
userID := strings.TrimSpace(c.Params("userId"))
|
||||
credentialBatchID, err := parseWorksmobileCredentialBatchID(c)
|
||||
|
||||
Reference in New Issue
Block a user