We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9186df commit 353b140Copy full SHA for 353b140
netlify/functions/blob.ts
@@ -5,7 +5,8 @@ export default async (req: Request) => {
5
6
if (req.method === "GET") {
7
const todos = await store.get("todos", { type: "json" });
8
- return new Response(todos || JSON.stringify([]), { status: 200 });
+ // @ts-expect-error `new` operator not needed for Response.json()
9
+ return Response.json(todos || JSON.stringify([]), { status: 200 });
10
}
11
12
if (req.method === "PUT") {
0 commit comments