Skip to content

Commit

Permalink
Merge pull request #33 from NovaGaia:feat/15-multi-refs
Browse files Browse the repository at this point in the history
Update Content-Type and Charset in API response headers
  • Loading branch information
hrenaud authored Feb 17, 2024
2 parents fca90c3 + 644eb5d commit a204b36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/api/[lang]/getFicheById/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export async function GET({ params, request }) {
return new Response(JSON.stringify(o), {
status: 200,
headers: {
"Content-Type": "application/json;charset=utf-8",
"Content-Type": "application/json; charset=UTF-8",
Charset: "UTF-8",
},
});
}
Expand All @@ -46,7 +47,6 @@ export async function getStaticPaths() {
lang,
id: entry.data.refID,
},
props: { entry, entries },
};
});

Expand Down
5 changes: 3 additions & 2 deletions src/pages/api/[lang]/getFiches.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { code_languages } from "@i18n/ui";
import type { APIRoute } from "astro";
import { code_languages } from "@i18n/ui";
import { getCollection } from "astro:content";
import { getRefConfig } from "referentiel-config";

Expand Down Expand Up @@ -33,7 +33,8 @@ export const GET: APIRoute = async ({ params, request }) => {
return new Response(JSON.stringify(output), {
status: 200,
headers: {
"Content-Type": "application/json;charset=utf-8",
"Content-Type": "application/json; charset=UTF-8",
Charset: "UTF-8",
},
});
};
Expand Down

0 comments on commit a204b36

Please sign in to comment.