Skip to content

Commit 353b140

Browse files
author
Jason Barry
committed
Fix blobs example
1 parent b9186df commit 353b140

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netlify/functions/blob.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export default async (req: Request) => {
55

66
if (req.method === "GET") {
77
const todos = await store.get("todos", { type: "json" });
8-
return new Response(todos || JSON.stringify([]), { status: 200 });
8+
// @ts-expect-error `new` operator not needed for Response.json()
9+
return Response.json(todos || JSON.stringify([]), { status: 200 });
910
}
1011

1112
if (req.method === "PUT") {

0 commit comments

Comments
 (0)