Don't check token length twice in Logout

oauth2
maru 2024-04-26 13:17:06 -04:00
parent 54d4d9a389
commit 4ce5a0198d
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 0 additions and 4 deletions

View File

@ -9,10 +9,6 @@ import (
// /account/logout - log out of account // /account/logout - log out of account
func Logout(token []byte) error { func Logout(token []byte) error {
if len(token) != TokenSize {
return fmt.Errorf("invalid token")
}
err := db.RemoveSessionFromToken(token) err := db.RemoveSessionFromToken(token)
if err != nil { if err != nil {
if err == sql.ErrNoRows { if err == sql.ErrNoRows {