Skip to content

Commit

Permalink
Remove support for simple objects in endpoints (#9181)
Browse files Browse the repository at this point in the history
* Deprecate simple object from endpoints

* Update changeset

* Add missing Response return

Co-authored-by: Happydev <[email protected]>

* Update .changeset/clever-beds-notice.md

Co-authored-by: Sarah Rainsberger <[email protected]>

---------

Co-authored-by: Happydev <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
  • Loading branch information
4 people authored Nov 27, 2023
1 parent 931cdb6 commit 6075219
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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}`,
});
}

0 comments on commit 6075219

Please sign in to comment.