summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2024-04-06 13:40:46 -0600
committerElizabeth Hunt <elizabeth@simponic.xyz>2024-04-06 13:40:46 -0600
commitcad8e2c4ed5e3bab61ff243f8677f8a46eaeafb0 (patch)
treeeafb35310236a15572cbb6e16ff8d6f181bfe240
parent5177735b835289c8437799536d3654e5ab142fa3 (diff)
downloadhatecomputers.club-cad8e2c4ed5e3bab61ff243f8677f8a46eaeafb0.tar.gz
hatecomputers.club-cad8e2c4ed5e3bab61ff243f8677f8a46eaeafb0.zip
nits
-rw-r--r--api/auth/auth.go2
-rw-r--r--api/auth/auth_test.go1
2 files changed, 1 insertions, 2 deletions
diff --git a/api/auth/auth.go b/api/auth/auth.go
index becce24..0ffbf9c 100644
--- a/api/auth/auth.go
+++ b/api/auth/auth.go
@@ -144,7 +144,7 @@ func VerifySessionContinuation(context *types.RequestContext, req *http.Request,
http.SetCookie(resp, &http.Cookie{
Name: "session",
Value: "",
- MaxAge: 0, // reset session cookie in case
+ MaxAge: 0,
})
context.User = nil
diff --git a/api/auth/auth_test.go b/api/auth/auth_test.go
index a3d5b16..5e67c6d 100644
--- a/api/auth/auth_test.go
+++ b/api/auth/auth_test.go
@@ -276,7 +276,6 @@ func TestRefreshUpdatesExpiration(t *testing.T) {
updatedSession, _ := database.GetSession(db, cookies["session"].Value)
- // if session expiration is greater than or equal to updated session expiration
if session.ExpireAt.After(updatedSession.ExpireAt) || session.ExpireAt.Equal(updatedSession.ExpireAt) {
t.Errorf("expected session expiration to be updated, got %s and %s", session.ExpireAt, updatedSession.ExpireAt)
}