From f87e1ba9c3846d8ee1e1fc4d514f5827de96e7ea Mon Sep 17 00:00:00 2001 From: m4x809 Date: Sat, 25 Oct 2025 14:14:08 +0200 Subject: [PATCH] Add cookie storage for lastImage in favico API GET route --- src/app/api/favico/route.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/api/favico/route.tsx b/src/app/api/favico/route.tsx index b4ccc3b..4e7b7a7 100644 --- a/src/app/api/favico/route.tsx +++ b/src/app/api/favico/route.tsx @@ -26,6 +26,8 @@ export async function GET(request: NextRequest) { } const album = availableAlbums[randomIndex]; console.log("🚀 ~ route.tsx:25 ~ GET ~ album:", album); + cookieStore.set("lastImage", album.image); + // Ensure image path starts with a slash const imagePath = album.image.startsWith("/") ? album.image : `/${album.image}`; console.log("🚀 ~ route.tsx:29 ~ GET ~ imagePath:", imagePath);