From 54fa25f3ddf93a74ab5a772dcb76b2dce68c8fca Mon Sep 17 00:00:00 2001 From: minie4 Date: Fri, 2 Jun 2023 14:23:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20crash=20when=20trying=20to?= =?UTF-8?q?=20renew=20session?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/auth.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/api/auth.js b/server/api/auth.js index e54fd36..1ea6ab5 100644 --- a/server/api/auth.js +++ b/server/api/auth.js @@ -30,6 +30,9 @@ async function isLoggedIn(req) { } async function renewSession(session) { + // Don't try to renew sessions if auth is disabled + if (session === true) return; + await prisma.session.update({ where: { token: session.token,