Skip to content

Commit

Permalink
debugged blogs error
Browse files Browse the repository at this point in the history
  • Loading branch information
Anas-github-acc committed Aug 23, 2024
1 parent e252f4e commit 7064fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/api/v1/get/blogs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ export async function GET(request: NextRequest): Promise<NextResponse> {
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);
}

Expand Down

0 comments on commit 7064fc5

Please sign in to comment.