refactor: remove some duplicated code

This commit is contained in:
2023-08-01 17:50:00 +02:00
parent 01697a6686
commit c5cf629482
30 changed files with 377 additions and 321 deletions

7
lib/helpers.ts Normal file
View File

@@ -0,0 +1,7 @@
export function json(content: unknown) {
const headers = new Headers();
headers.append("Content-Type", "application/json");
return new Response(JSON.stringify(content), {
headers,
});
}