mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-02 02:57:15 +08:00
Fixed some debug issues commented out code
This commit is contained in:
parent
59356c9137
commit
285cf78d7a
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,4 +15,3 @@ secret.key
|
|||||||
*.iws
|
*.iws
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
|
|
||||||
#local stuff
|
|
||||||
|
@ -22,7 +22,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"log"
|
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
)
|
)
|
||||||
@ -113,8 +112,6 @@ func RetrieveDiscordId(code string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsUserDiscordAdmin(discordId string, discordGuildID string) (bool, error) {
|
func IsUserDiscordAdmin(discordId string, discordGuildID string) (bool, error) {
|
||||||
return discordId == "256000469158068224", nil
|
|
||||||
|
|
||||||
// fetch all roles from discord
|
// fetch all roles from discord
|
||||||
roles, err := DiscordSession.GuildRoles(discordGuildID)
|
roles, err := DiscordSession.GuildRoles(discordGuildID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -24,7 +24,6 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
|
|
||||||
"github.com/pagefaultgames/rogueserver/db"
|
"github.com/pagefaultgames/rogueserver/db"
|
||||||
)
|
)
|
||||||
@ -53,8 +52,7 @@ func Login(username, password string) (LoginResponse, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !bytes.Equal(key, deriveArgon2IDKey([]byte(password), salt)) {
|
if !bytes.Equal(key, deriveArgon2IDKey([]byte(password), salt)) {
|
||||||
log.Printf("Hello")
|
return response, fmt.Errorf("password doesn't match")
|
||||||
return response, fmt.Errorf("passworasdasdasdd doesn't match")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
response.Token, err = GenerateTokenForUsername(username)
|
response.Token, err = GenerateTokenForUsername(username)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user