fix channel caches, add hub functions to api endpoints
This commit is contained in:
@@ -38,6 +38,7 @@ func main() {
|
||||
http.HandleFunc("POST /user", withCORS(httpRequest.HandleUserNew))
|
||||
http.HandleFunc("DELETE /user", withCORS(httpRequest.HandleUserDelete))
|
||||
http.HandleFunc("GET /user", withCORS(httpRequest.HandleUserGetUser))
|
||||
http.HandleFunc("GET /users", withCORS(httpRequest.HandleUserGetUsers))
|
||||
http.HandleFunc("PATCH /user/profile", withCORS(httpRequest.HandleUserModProfile))
|
||||
http.HandleFunc("PATCH /user/avatar", withCORS(httpRequest.HandleSetUserAvatar))
|
||||
http.HandleFunc("PATCH /user/profilebg", withCORS(httpRequest.HandleSetUserProfileBg))
|
||||
@@ -60,7 +61,28 @@ func main() {
|
||||
http.HandleFunc("POST /hub", withCORS(httpRequest.HandleHubCreate))
|
||||
http.HandleFunc("POST /hub/message", withCORS(httpRequest.HandleHubMessage))
|
||||
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("PUT /hub/join", withCORS(httpRequest.HandleHubJoin))
|
||||
http.HandleFunc("PATCH /hub/name", withCORS(httpRequest.HandleHubSetName))
|
||||
http.HandleFunc("PATCH /hub/color", withCORS(httpRequest.HandleHubSetColor))
|
||||
http.HandleFunc("DELETE /hub", withCORS(httpRequest.HandleHubRemove))
|
||||
http.HandleFunc("PATCH /hub/usercolorallowed", withCORS(httpRequest.HandleHubToggleUserColorAllowed))
|
||||
http.HandleFunc("DELETE /hub/user", withCORS(httpRequest.HandleHubUserRemove))
|
||||
http.HandleFunc("PATCH /hub/user/name", withCORS(httpRequest.HandleHubRenameUser))
|
||||
http.HandleFunc("PATCH /hub/self/name", withCORS(httpRequest.HandleHubRenameSelf))
|
||||
http.HandleFunc("PATCH /hub/user/mute", withCORS(httpRequest.HandleHubToggleMuteUser))
|
||||
http.HandleFunc("PUT /hub/user/role", withCORS(httpRequest.HandleHubUserAddRole))
|
||||
http.HandleFunc("DELETE /hub/user/role", withCORS(httpRequest.HandleHubUserRemoveRole))
|
||||
http.HandleFunc("PUT /hub/role", httpRequest.HandleHubCreateRole)
|
||||
http.HandleFunc("DELETE /hub/role", withCORS(httpRequest.HandleHubRemoveRole))
|
||||
http.HandleFunc("PATCH /hub/role/name", withCORS(httpRequest.HandleRoleSetName))
|
||||
http.HandleFunc("PATCH /hub/role/color", withCORS(httpRequest.HandleRoleSetColor))
|
||||
http.HandleFunc("PATCH /hub/role/permissions", withCORS(httpRequest.HandleRoleSetPermissions))
|
||||
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("POST /connection/message", withCORS(httpRequest.HandleDm))
|
||||
http.HandleFunc("GET /ws", wsServer.ServeWsConnection)
|
||||
|
||||
Reference in New Issue
Block a user