add foreign key constraint on client session table
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -19,6 +19,7 @@ package account
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/pagefaultgames/rogueserver/db"
|
||||
@@ -28,7 +29,7 @@ import (
|
||||
func Logout(token []byte) error {
|
||||
err := db.RemoveSessionFromToken(token)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return fmt.Errorf("token not found")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user