refactor: remove some duplicated code
This commit is contained in:
7
lib/helpers.ts
Normal file
7
lib/helpers.ts
Normal 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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user