Skip to content

Commit ee38214

Browse files
authored
[docs] fix wrong usage of Response (#163)
1 parent a5017b2 commit ee38214

File tree

1 file changed

+6
-2
lines changed
  • content/tutorial/02-sveltekit/05-api-routes/01-get-handlers

1 file changed

+6
-2
lines changed

content/tutorial/02-sveltekit/05-api-routes/01-get-handlers/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export function GET() {
1212
const number = Math.ceil(Math.random() * 6);
1313

1414
return new Response(number, {
15-
'Content-Type': 'application/json'
15+
headers: {
16+
'Content-Type': 'application/json'
17+
}
1618
});
1719
}
1820
```
@@ -29,7 +31,9 @@ export function GET() {
2931
const number = Math.ceil(Math.random() * 6);
3032

3133
--- return new Response(number, {
32-
'Content-Type': 'application/json'
34+
headers: {
35+
'Content-Type': 'application/json'
36+
}
3337
});---
3438
+++ return json(number);+++
3539
}

0 commit comments

Comments
 (0)