add user deletion and rename user http
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func HttpHandleUserMessage(response http.ResponseWriter, request *http.Request) {
|
||||
func HttpHandleDm(response http.ResponseWriter, request *http.Request) {
|
||||
if !HttpMethodAllowed(&response, request) {
|
||||
return
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
func HttpHandleTokenNew(response http.ResponseWriter, request *http.Request) {
|
||||
func HttpHandleUserNewToken(response http.ResponseWriter, request *http.Request) {
|
||||
if !HttpMethodAllowed(&response, request) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ func main() {
|
||||
|
||||
http.HandleFunc("/new/user", withCORS(HttpHandleUserNew))
|
||||
http.HandleFunc("/new/connection", withCORS(HttpHandleUserNewConnection))
|
||||
http.HandleFunc("/new/token", withCORS(HttpHandleTokenNew))
|
||||
http.HandleFunc("/new/token", withCORS(HttpHandleUserNewToken))
|
||||
http.HandleFunc("/new/group", withCORS(HttpHandeGroupCreate))
|
||||
|
||||
http.HandleFunc("/mod/user/appearence", withCORS(HttpHandleUserModifyAppearance))
|
||||
@@ -35,10 +35,11 @@ func main() {
|
||||
http.HandleFunc("/get/connection/messages", withCORS(HttpHandleUserGetConnectionMessages))
|
||||
http.HandleFunc("/get/group/members", withCORS(HttpHandleGroupMembersGet))
|
||||
|
||||
http.HandleFunc("/del/user", withCORS(HttpHandleUserDelete))
|
||||
http.HandleFunc("/del/group", withCORS(HttpHandleGroupDelete))
|
||||
http.HandleFunc("/del/connection", withCORS(HttpHandleUserDeleteConnection))
|
||||
|
||||
http.HandleFunc("/msg/user", withCORS(HttpHandleUserMessage))
|
||||
http.HandleFunc("/msg/user", withCORS(HttpHandleDm))
|
||||
http.HandleFunc("/msg/group", withCORS(HttpHandleGroupMessage))
|
||||
http.HandleFunc("/ws", ServeWsConnection)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user