From 7064fc54c32c24e707df9ce33d9cb5c95e2f0c9e Mon Sep 17 00:00:00 2001 From: Anas-github-acc Date: Fri, 23 Aug 2024 11:58:11 +0530 Subject: [PATCH] debugged blogs error --- src/app/api/v1/get/blogs/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/api/v1/get/blogs/route.ts b/src/app/api/v1/get/blogs/route.ts index ed3b0bf..9f5b896 100644 --- a/src/app/api/v1/get/blogs/route.ts +++ b/src/app/api/v1/get/blogs/route.ts @@ -36,10 +36,11 @@ export async function GET(request: NextRequest): Promise { const blogFileUrl = `${getPublicUrl(`/blogs/${blog.id}/blog`)}`; const { data: images, error: imagesError } = await supabase.storage - .from(process.env.BUCKET || "") + .from(process.env.NEXT_PUBLIC_BUCKET || "") .list(`images/${blog.id}`); if (imagesError) { + console.log("imagesError", imagesError); throw new Error(imagesError.message); }