Delete Uptime History from deleted Applications

This commit is contained in:
headlessdev 2025-04-15 14:10:16 +02:00
parent a320c04b92
commit 1088806921

View File

@ -14,6 +14,10 @@ export async function POST(request: NextRequest) {
where: { id: id } where: { id: id }
}); });
await prisma.uptime_history.deleteMany({
where: { applicationId: id }
});
return NextResponse.json({ success: true }); return NextResponse.json({ success: true });
} catch (error: any) { } catch (error: any) {
return NextResponse.json({ error: error.message }, { status: 500 }); return NextResponse.json({ error: error.message }, { status: 500 });