mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-02 02:57:15 +08:00
chore: Refactor handleAccountInfo function for improved readability and error handling
This commit is contained in:
parent
d9caefed71
commit
dff7579360
@ -70,7 +70,10 @@ func handleAccountInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasAdminRole, _ := account.IsUserDiscordAdmin(discordId, account.DiscordGuildID)
|
var hasAdminRole bool
|
||||||
|
if discordId != "" {
|
||||||
|
hasAdminRole, _ = account.IsUserDiscordAdmin(discordId, account.DiscordGuildID)
|
||||||
|
}
|
||||||
|
|
||||||
response, err := account.Info(username, discordId, googleId, uuid, hasAdminRole)
|
response, err := account.Info(username, discordId, googleId, uuid, hasAdminRole)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user