mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-18 07:56:57 +00:00
Delete Uptime History from deleted Applications
This commit is contained in:
parent
a320c04b92
commit
1088806921
@ -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 });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user