fix hub bugs, add channel role permission endpoints
Covers: snake_case param renames, mutex RLock/Unlock mismatches, user.Hubs keyed by hub.Id, hub color using new_name, DELETE params sent as query, delete(target.Hubs, hub.Id), root/member role Id swap, and the three new PATCH /hub/channel/roles/* handlers.
This commit is contained in:
@@ -153,9 +153,9 @@ func HandleGetUserAvatar(response http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
targetId, err := convertions.StringToUuid(request.URL.Query().Get("userid"))
|
||||
targetId, err := convertions.StringToUuid(request.URL.Query().Get("user_id"))
|
||||
if err != nil {
|
||||
http.Error(response, "invalid userid", http.StatusBadRequest)
|
||||
http.Error(response, "invalid user_id", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -274,9 +274,9 @@ func HandleGetUserProfileBg(response http.ResponseWriter, request *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
targetId, err := convertions.StringToUuid(request.URL.Query().Get("userid"))
|
||||
targetId, err := convertions.StringToUuid(request.URL.Query().Get("user_id"))
|
||||
if err != nil {
|
||||
http.Error(response, "invalid userid", http.StatusBadRequest)
|
||||
http.Error(response, "invalid user_id", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user