mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-17 15:36:50 +00:00
Add echobell fields to notification request handling
This commit is contained in:
parent
073cd00120
commit
0f2afb4157
@ -21,12 +21,14 @@ interface AddRequest {
|
|||||||
pushoverUrl?: string;
|
pushoverUrl?: string;
|
||||||
pushoverToken?: string;
|
pushoverToken?: string;
|
||||||
pushoverUser?: string;
|
pushoverUser?: string;
|
||||||
|
echobellURL?: string;
|
||||||
|
echobellData?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function POST(request: NextRequest) {
|
export async function POST(request: NextRequest) {
|
||||||
try {
|
try {
|
||||||
const body: AddRequest = await request.json();
|
const body: AddRequest = await request.json();
|
||||||
const { type, name, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, smtpFrom, smtpTo, telegramToken, telegramChatId, discordWebhook, gotifyUrl, gotifyToken, ntfyUrl, ntfyToken, pushoverUrl, pushoverToken, pushoverUser } = body;
|
const { type, name, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, smtpFrom, smtpTo, telegramToken, telegramChatId, discordWebhook, gotifyUrl, gotifyToken, ntfyUrl, ntfyToken, pushoverUrl, pushoverToken, pushoverUser, echobellURL, echobellData } = body;
|
||||||
|
|
||||||
const notification = await prisma.notification.create({
|
const notification = await prisma.notification.create({
|
||||||
data: {
|
data: {
|
||||||
@ -49,6 +51,8 @@ export async function POST(request: NextRequest) {
|
|||||||
pushoverUrl: pushoverUrl,
|
pushoverUrl: pushoverUrl,
|
||||||
pushoverToken: pushoverToken,
|
pushoverToken: pushoverToken,
|
||||||
pushoverUser: pushoverUser,
|
pushoverUser: pushoverUser,
|
||||||
|
echobellURL: echobellURL,
|
||||||
|
echobellData: echobellData,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user