Add Echobell provider

This commit is contained in:
headlessdev
2025-04-29 22:52:29 +02:00
parent 1a395783b0
commit 1fccc59c01
9 changed files with 43 additions and 24 deletions

View File

@@ -22,13 +22,12 @@ interface AddRequest {
pushoverToken?: string;
pushoverUser?: string;
echobellURL?: string;
echobellData?: string;
}
export async function POST(request: NextRequest) {
try {
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, echobellURL, echobellData } = body;
const { type, name, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, smtpFrom, smtpTo, telegramToken, telegramChatId, discordWebhook, gotifyUrl, gotifyToken, ntfyUrl, ntfyToken, pushoverUrl, pushoverToken, pushoverUser, echobellURL } = body;
const notification = await prisma.notification.create({
data: {
@@ -51,8 +50,7 @@ export async function POST(request: NextRequest) {
pushoverUrl: pushoverUrl,
pushoverToken: pushoverToken,
pushoverUser: pushoverUser,
echobellURL: echobellURL,
echobellData: echobellData,
echobellURL: echobellURL
}
});