chore: add prettier with config and format all files

This commit is contained in:
Sebastian Seedorf
2026-06-04 11:44:20 +02:00
parent d212ae3f30
commit cf9bb33ecb
50 changed files with 1290 additions and 714 deletions

View File

@@ -10,15 +10,16 @@ export const GET = withAuth(async () => {
export const POST = withAuth(async (req: NextRequest) => {
const body = await req.json();
const {
item_key, item_key_is_regex = false,
combinator = null, signal_type = 'green', condition, threshold,
item_key,
item_key_is_regex = false,
combinator = null,
signal_type = 'green',
condition,
threshold,
} = body;
if (!item_key || !condition || threshold === undefined) {
return NextResponse.json(
{ error: 'item_key, condition, threshold required' },
{ status: 400 },
);
return NextResponse.json({ error: 'item_key, condition, threshold required' }, { status: 400 });
}
const result = await pool.query(
@@ -27,4 +28,4 @@ export const POST = withAuth(async (req: NextRequest) => {
[item_key, item_key_is_regex, combinator, signal_type, condition, threshold],
);
return NextResponse.json(result.rows[0], { status: 201 });
});
});