From 07931fca6da6a1020c850d5cc72b0976fe9f5e12 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 30 Sep 2023 23:30:01 -0500 Subject: [PATCH] Fix auth session type --- src/cache/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache/index.ts b/src/cache/index.ts index 07b12d8b..b7d79606 100644 --- a/src/cache/index.ts +++ b/src/cache/index.ts @@ -1,4 +1,3 @@ -import type { Session } from 'next-auth/types'; import { revalidateTag, unstable_cache } from 'next/cache'; import { GetPhotosOptions, @@ -10,6 +9,7 @@ import { } from '@/services/postgres'; import { parseCachedPhotosDates, parseCachedPhotoDates } from '@/photo'; import { getBlobPhotoUrls, getBlobUploadUrls } from '@/services/blob'; +import { AuthSession } from 'next-auth'; const TAG_PHOTOS = 'photos'; const TAG_PHOTOS_COUNT = 'photos-count'; @@ -113,7 +113,7 @@ export const getBlobPhotoUrlsCached: typeof getBlobPhotoUrls = (...args) => } )(); -export const getImageCacheHeadersForAuth = (session?: Session) => { +export const getImageCacheHeadersForAuth = (session: AuthSession | null) => { return { 'Cache-Control': !session?.user ? 's-maxage=3600, stale-while-revalidate=59'