feat: midterm shit done

This commit is contained in:
Tony Yang
2025-04-15 03:59:33 +08:00
parent f093df29a1
commit f7ee02586b
34 changed files with 1460 additions and 197 deletions
+13
View File
@@ -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' },
});
}