Commit 9485e8cf by utkarshcmu

/api/admin/users returns user ID

parent 305f8d69
......@@ -37,7 +37,14 @@ func AdminCreateUser(c *middleware.Context, form dtos.AdminCreateUserForm) {
metrics.M_Api_Admin_User_Create.Inc(1)
c.JsonOK("User created")
user := cmd.Result
result := m.UserIdDTO{
Message: "User created",
Id: user.Id,
}
c.JSON(200, result)
}
func AdminUpdateUserPassword(c *middleware.Context, form dtos.AdminUpdateUserPasswordForm) {
......@@ -96,5 +103,5 @@ func AdminDeleteUser(c *middleware.Context) {
return
}
c.JsonOK("User deleted")
c.JsonOK("User deleted")
}
......@@ -157,3 +157,8 @@ type UserSearchHitDTO struct {
Email string `json:"email"`
IsAdmin bool `json:"isAdmin"`
}
type UserIdDTO struct {
Id int64 `json:"id"`
Message string `json:"message"`
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment