feat: add discord and pushover as notification agents (#300)

fix: most error messages of the notifications endpoints would not reach the frontend
This commit is contained in:
Miguel Ribeiro
2024-05-06 18:55:10 +02:00
committed by GitHub
parent 4199d4c3e7
commit 899482982e
40 changed files with 2317 additions and 23 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
/*
* This migration adds tables to store the date about the new notification methods (pushover and discord)
*/
/** @noinspection PhpUndefinedVariableInspection */
$db->exec('CREATE TABLE IF NOT EXISTS pushover_notifications (
enabled BOOLEAN DEFAULT 0,
user_key TEXT DEFAULT "",
token TEXT DEFAULT ""
)');
$db->exec('CREATE TABLE IF NOT EXISTS discord_notifications (
enabled BOOLEAN DEFAULT 0,
webhook_url TEXT DEFAULT "",
bot_username TEXT DEFAULT "",
bot_avatar_url TEXT DEFAULT ""
)');