mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix(routes): /raw/{pasteId} no longer returns a body on error
This commit is contained in:
@@ -7,7 +7,10 @@ export const GET: RequestHandler = async ({ params }) => {
|
||||
const res = await fetch(`${apiUrl}/api/paste/${id}/raw`);
|
||||
|
||||
if (res.status === 404) {
|
||||
return new Response('Paste not found', { status: 404 });
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: 'Not Found'
|
||||
});
|
||||
}
|
||||
const content = await res.text();
|
||||
return new Response(content, {
|
||||
|
||||
Reference in New Issue
Block a user