mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Monitoring Settings API Routes
This commit is contained in:
11
app/api/notifications/settings_applications_get/route.ts
Normal file
11
app/api/notifications/settings_applications_get/route.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import prisma from "@/app/prisma";
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const notification = await prisma.applicationMonitoringNotification.findFirst();
|
||||
return NextResponse.json({ notification }, { status: 200 });
|
||||
} catch (error) {
|
||||
return NextResponse.json({ error: "Failed to get application monitoring notification" }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user