diff --git a/app/api/galleries/[id]/images/route.ts b/app/api/galleries/[id]/images/route.ts index 941a19f..1e6bf93 100644 --- a/app/api/galleries/[id]/images/route.ts +++ b/app/api/galleries/[id]/images/route.ts @@ -71,7 +71,6 @@ export async function GET( } break; default: - blobBuffer = await blurImage(blobBuffer) break; } const contentType = file.name.endsWith('.png') ? 'image/png' : 'image/jpeg'; diff --git a/app/api/galleries/[id]/thumbnail/route.ts b/app/api/galleries/[id]/thumbnail/route.ts index 47042b3..e6e9d63 100644 --- a/app/api/galleries/[id]/thumbnail/route.ts +++ b/app/api/galleries/[id]/thumbnail/route.ts @@ -62,7 +62,10 @@ const galleryId= params.id // 312 } break; default: - + if(gallery.nsfw){ + blobBuffer = await blurImage(blobBuffer); + + } break; } const dataUrl = `data:${contentType};base64,${blobBuffer.toString('base64')}`; diff --git a/app/gallery/page.tsx b/app/gallery/page.tsx index b8e8387..767b4c2 100644 --- a/app/gallery/page.tsx +++ b/app/gallery/page.tsx @@ -118,7 +118,7 @@ function PageComponent() {