Add uptimecheckUrl to AddRequest and EditRequest interfaces, updating application creation and editing logic accordingly

This commit is contained in:
headlessdev
2025-04-27 14:58:44 +02:00
parent 65f8e16fbc
commit 3dc2c6b204
2 changed files with 8 additions and 4 deletions

View File

@@ -8,12 +8,13 @@ interface AddRequest {
icon: string;
publicURL: string;
localURL: string;
uptimecheckUrl: string;
}
export async function POST(request: NextRequest) {
try {
const body: AddRequest = await request.json();
const { serverId, name, description, icon, publicURL, localURL } = body;
const { serverId, name, description, icon, publicURL, localURL, uptimecheckUrl } = body;
const application = await prisma.application.create({
data: {
@@ -22,7 +23,8 @@ export async function POST(request: NextRequest) {
description,
icon,
publicURL,
localURL
localURL,
uptimecheckUrl
}
});