mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Add Notification Provider
This commit is contained in:
@@ -14,8 +14,10 @@ export async function POST(request: NextRequest) {
|
||||
const body = await request.json();
|
||||
const { name, type, config } = schema.parse(body);
|
||||
|
||||
const parsedConfig = JSON.parse(config);
|
||||
|
||||
const notification = await prisma.notificationProvider.create({
|
||||
data: { name, type: type as NotificationType, config, tests: {} },
|
||||
data: { name, type: type as NotificationType, config: parsedConfig},
|
||||
});
|
||||
|
||||
return NextResponse.json({ notification }, { status: 201 });
|
||||
|
||||
Reference in New Issue
Block a user