mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-02 02:57:15 +08:00
Refactor handleAdminDiscordLink function for improved error handling and logging
This commit is contained in:
parent
3ccc000646
commit
856ad7aac9
@ -669,6 +669,12 @@ func handleProviderLogout(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func handleAdminDiscordLink(w http.ResponseWriter, r *http.Request) {
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
httpError(w, r, fmt.Errorf("failed to parse request form: %s", err), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
uuid, err := uuidFromRequest(r)
|
||||
if err != nil {
|
||||
httpError(w, r, err, http.StatusUnauthorized)
|
||||
|
Loading…
x
Reference in New Issue
Block a user