feat: midterm shit done
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export function createErrorResponse(message, status) {
|
||||
return new Response(JSON.stringify({"error": message}), {
|
||||
status: status,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
}
|
||||
|
||||
export function createSuccessResponse(data, status = 200) {
|
||||
return new Response(JSON.stringify(data), {
|
||||
status: status,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user