Merged in fix/check-valid-session (pull request #1502)

Fix/check valid session

* fix:session - check if valid session

* Refactor


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-03-10 09:06:23 +00:00
parent 19bb965298
commit 183a6476e7
3 changed files with 10 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ import "server-only"
import type { Session } from "next-auth"
export function isValidSession(session: Session | null) {
export function isValidSession(session: Session | null): session is Session {
if (!session) {
console.log("No session available (user not authenticated).")
return false