mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 08:31:30 +08:00
Don't check token length twice in Logout
This commit is contained in:
parent
54d4d9a389
commit
4ce5a0198d
@ -9,10 +9,6 @@ import (
|
||||
|
||||
// /account/logout - log out of account
|
||||
func Logout(token []byte) error {
|
||||
if len(token) != TokenSize {
|
||||
return fmt.Errorf("invalid token")
|
||||
}
|
||||
|
||||
err := db.RemoveSessionFromToken(token)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
|
Loading…
x
Reference in New Issue
Block a user