mirror of
https://github.com/withastro/astro.git
synced 2025-04-07 23:41:43 -05:00
Remove support for simple objects in endpoints (#9181)
* Deprecate simple object from endpoints * Update changeset * Add missing Response return Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com> * Update .changeset/clever-beds-notice.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
parent
931cdb6243
commit
60752197b7
1 changed files with 4 additions and 6 deletions
|
@ -1,9 +1,7 @@
|
|||
export async function GET() {
|
||||
let number = Math.random();
|
||||
return {
|
||||
body: JSON.stringify({
|
||||
number,
|
||||
message: `Here's a random number: ${number}`,
|
||||
}),
|
||||
};
|
||||
return Response.json({
|
||||
number,
|
||||
message: `Here's a random number: ${number}`,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue