feat: alerts api (create/delete)

This commit is contained in:
2026-05-25 14:25:55 +00:00
parent 8a284edcb1
commit 8dcae4d60f
2 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import { NextRequest, NextResponse } from 'next/server'
import { eq } from 'drizzle-orm'
import { db, alerts } from '@/lib/db'
export async function DELETE(_req: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params
await db.delete(alerts).where(eq(alerts.id, id))
return NextResponse.json({ ok: true })
}