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:
@@ -59,10 +59,13 @@ func main() {
|
||||
http.HandleFunc("GET /file", withCORS(httpRequest.HandleAttachmentFileDownload))
|
||||
|
||||
http.HandleFunc("POST /hub", withCORS(httpRequest.HandleHubCreate))
|
||||
http.HandleFunc("POST /hub/message", withCORS(httpRequest.HandleHubMessage))
|
||||
http.HandleFunc("GET /hub", withCORS(httpRequest.GetHubData))
|
||||
http.HandleFunc("POST /hub/channel/message", withCORS(httpRequest.HandleHubMessage))
|
||||
http.HandleFunc("GET /hub/channel", withCORS(httpRequest.GetChannelData))
|
||||
http.HandleFunc("GET /hubs", withCORS(httpRequest.HandleGetHubs))
|
||||
http.HandleFunc("GET /hubs/channels", withCORS(httpRequest.HandleGetChannels))
|
||||
http.HandleFunc("GET /hubs/users", withCORS(httpRequest.HandleGetHubUsers))
|
||||
http.HandleFunc("GET /hubs/roles", withCORS(httpRequest.GetRoles))
|
||||
http.HandleFunc("PUT /hub/join", withCORS(httpRequest.HandleHubJoin))
|
||||
http.HandleFunc("PATCH /hub/name", withCORS(httpRequest.HandleHubSetName))
|
||||
http.HandleFunc("PATCH /hub/color", withCORS(httpRequest.HandleHubSetColor))
|
||||
@@ -82,8 +85,11 @@ func main() {
|
||||
http.HandleFunc("DELETE /hub/self/role", withCORS(httpRequest.HandleRoleSelfRemove))
|
||||
http.HandleFunc("PUT /hub/channel", withCORS(httpRequest.HandleChannelCreate))
|
||||
http.HandleFunc("DELETE /hub/channel", withCORS(httpRequest.HandleChannelRemove))
|
||||
http.HandleFunc("PATCH /hub/name", withCORS(httpRequest.HandleChannelSetName))
|
||||
http.HandleFunc("PATCH /hub/description", withCORS(httpRequest.HandleChannelSetDescription))
|
||||
http.HandleFunc("PATCH /hub/channel/name", withCORS(httpRequest.HandleChannelSetName))
|
||||
http.HandleFunc("PATCH /hub/channel/description", withCORS(httpRequest.HandleChannelSetDescription))
|
||||
http.HandleFunc("PATCH /hub/channel/roles/view", withCORS(httpRequest.HandleChannelSetPermittedVisibleRole))
|
||||
http.HandleFunc("PATCH /hub/channel/roles/send", withCORS(httpRequest.HandleChannelSetPermittedSendRole))
|
||||
http.HandleFunc("PATCH /hub/channel/roles/history", withCORS(httpRequest.HandleChannelSetPermittedHistoryRole))
|
||||
|
||||
http.HandleFunc("POST /connection/message", withCORS(httpRequest.HandleDm))
|
||||
http.HandleFunc("GET /ws", wsServer.ServeWsConnection)
|
||||
|
||||
Reference in New Issue
Block a user