From 8f592a0f2e19d20670a7950b4181b71d99b19e18 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 30 Nov 2024 12:36:28 +0200 Subject: [PATCH] Change soft deletion of sessions to be hard delete --- tokens/sessions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokens/sessions.go b/tokens/sessions.go index dfafd4b..96a867a 100644 --- a/tokens/sessions.go +++ b/tokens/sessions.go @@ -37,7 +37,7 @@ func ValidateSessionToken(token string) bool { return false } if session.ExpireAt.Unix() < time.Now().Unix() { - dbc.Delete(session) + dbc.Unscoped().Delete(session) return false } return session.ID != ""