fix: format

This commit is contained in:
skidoodle 2025-01-03 12:10:47 +01:00
parent eda85a3292
commit adb45ca8fd
Signed by: albert
GPG key ID: A06E3070D7D55BF2
2 changed files with 185 additions and 185 deletions

View file

@ -13,7 +13,7 @@ async function authenticateSuperuser() {
export async function GET( export async function GET(
_req: Request, _req: Request,
context: { params: Promise<{ id: string }> } context: { params: Promise<{ id: string }> },
) { ) {
try { try {
await authenticateSuperuser(); await authenticateSuperuser();
@ -29,7 +29,7 @@ export async function GET(
{ {
status: 400, status: 400,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
@ -49,14 +49,14 @@ export async function GET(
{ {
status: 500, status: 500,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
} }
export async function DELETE( export async function DELETE(
_req: Request, _req: Request,
context: { params: Promise<{ id: string }> } context: { params: Promise<{ id: string }> },
) { ) {
try { try {
await authenticateSuperuser(); await authenticateSuperuser();
@ -72,7 +72,7 @@ export async function DELETE(
{ {
status: 400, status: 400,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
@ -84,7 +84,7 @@ export async function DELETE(
{ {
status: 200, status: 200,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} catch (error) { } catch (error) {
console.error("Error deleting data:", error); console.error("Error deleting data:", error);
@ -97,14 +97,14 @@ export async function DELETE(
{ {
status: 500, status: 500,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
} }
export async function PUT( export async function PUT(
req: Request, req: Request,
context: { params: Promise<{ id: string }> } context: { params: Promise<{ id: string }> },
) { ) {
try { try {
await authenticateSuperuser(); await authenticateSuperuser();
@ -120,7 +120,7 @@ export async function PUT(
{ {
status: 400, status: 400,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
@ -135,7 +135,7 @@ export async function PUT(
{ {
status: 400, status: 400,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
@ -155,7 +155,7 @@ export async function PUT(
{ {
status: 500, status: 500,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
} }

View file

@ -30,7 +30,7 @@ export async function GET() {
{ {
status: 500, status: 500,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
} }
@ -55,7 +55,7 @@ export async function POST(req: Request) {
{ {
status: 500, status: 500,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
} },
); );
} }
} }