fix: placeholder image for thumbnails
Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import Sidebar from "../shared/Sidebar"
|
||||
import { Toaster } from "../ui/toaster"
|
||||
|
||||
@@ -16,7 +15,6 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
||||
{children}
|
||||
</div>
|
||||
<Toaster />
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
// Send the image data
|
||||
res.send(Buffer.from(imageBuffer))
|
||||
} catch (error) {
|
||||
|
||||
res.redirect("https://placehold.co/400")
|
||||
console.error('Error:', error)
|
||||
res.status(500).json({ message: 'Internal Server Error' })
|
||||
// res.status(500).json({ message: 'Internal Server Error' })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user