mirror of
https://github.com/M4X809/list-of-lp.git
synced 2025-12-25 19:12:48 +00:00
Add cookie storage for lastImage in favico API GET route
This commit is contained in:
parent
688255f8bd
commit
f87e1ba9c3
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue