From 44fdb88ab2c7629270b9ce165ba6ed0198f50123 Mon Sep 17 00:00:00 2001 From: Aelita4 Date: Tue, 18 Jun 2024 16:11:26 +0200 Subject: [PATCH] Fix "getAllPlanets" endpoint not returning code and message --- src/pages/api/planets/getAllPlanets.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/api/planets/getAllPlanets.ts b/src/pages/api/planets/getAllPlanets.ts index c9c5ec8..098fdb3 100644 --- a/src/pages/api/planets/getAllPlanets.ts +++ b/src/pages/api/planets/getAllPlanets.ts @@ -17,6 +17,10 @@ export const GET: APIRoute = async ({ request }) => { }); return new Response( - JSON.stringify(response) + JSON.stringify({ + code: 200, + message: "OK", + data: response + }) ); } \ No newline at end of file