chore: add prettier with config and format all files
This commit is contained in:
@@ -5,7 +5,8 @@ import { withAuth } from '@/lib/apiHelpers';
|
||||
export const PUT = withAuth(async (req: NextRequest, { params }) => {
|
||||
const { id } = await params;
|
||||
const body = await req.json();
|
||||
const { item_key, item_key_is_regex, combinator, signal_type, condition, threshold, active } = body;
|
||||
const { item_key, item_key_is_regex, combinator, signal_type, condition, threshold, active } =
|
||||
body;
|
||||
|
||||
const result = await pool.query(
|
||||
`UPDATE alerts SET
|
||||
@@ -29,4 +30,4 @@ export const DELETE = withAuth(async (_req: NextRequest, { params }) => {
|
||||
const result = await pool.query('DELETE FROM alerts WHERE id = $1', [id]);
|
||||
if (result.rowCount === 0) return NextResponse.json({ error: 'Not found' }, { status: 404 });
|
||||
return NextResponse.json({ ok: true });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user