mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
msc3861: cr fixes
This commit is contained in:
parent
8df644263c
commit
3eb4c7e1bd
6 changed files with 36 additions and 39 deletions
|
@ -349,14 +349,10 @@ func Setup(
|
|||
})).Methods(http.MethodPost)
|
||||
synapseAdminRouter.Handle("/admin/v2/users/{userID}",
|
||||
httputil.MakeServiceAdminAPI("admin_manage_user", m.AdminToken, func(r *http.Request) util.JSONResponse {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
if r.Method == http.MethodGet {
|
||||
return AdminRetrieveAccount(r, cfg, userAPI)
|
||||
case http.MethodPut:
|
||||
return AdminCreateOrModifyAccount(r, userAPI, cfg)
|
||||
default:
|
||||
return util.JSONResponse{Code: http.StatusMethodNotAllowed, JSON: nil}
|
||||
}
|
||||
return AdminCreateOrModifyAccount(r, userAPI, cfg)
|
||||
})).Methods(http.MethodPut, http.MethodGet)
|
||||
synapseAdminRouter.Handle("/admin/v2/users/{userID}/devices",
|
||||
httputil.MakeServiceAdminAPI("admin_create_retrieve_user_devices", m.AdminToken, func(r *http.Request) util.JSONResponse {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue