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:
@@ -17,7 +17,7 @@
|
||||
if (!isset($data["days"]) || $data['days'] == "") {
|
||||
$response = [
|
||||
"success" => false,
|
||||
"errorMessage" => translate('fill_mandatory_fields', $i18n)
|
||||
"message" => translate('fill_mandatory_fields', $i18n)
|
||||
];
|
||||
echo json_encode($response);
|
||||
} else {
|
||||
@@ -28,7 +28,7 @@
|
||||
if ($result === false) {
|
||||
$response = [
|
||||
"success" => false,
|
||||
"errorMessage" => translate('error_saving_notifications', $i18n)
|
||||
"message" => translate('error_saving_notifications', $i18n)
|
||||
];
|
||||
echo json_encode($response);
|
||||
} else {
|
||||
@@ -51,7 +51,7 @@
|
||||
} else {
|
||||
$response = [
|
||||
"success" => false,
|
||||
"errorMessage" => translate('error_saving_notifications', $i18n)
|
||||
"message" => translate('error_saving_notifications', $i18n)
|
||||
];
|
||||
echo json_encode($response);
|
||||
}
|
||||
@@ -60,7 +60,7 @@
|
||||
} else {
|
||||
$response = [
|
||||
"success" => false,
|
||||
"errorMessage" => "Invalid request method"
|
||||
"message" => "Invalid request method"
|
||||
];
|
||||
echo json_encode($response);
|
||||
exit();
|
||||
|
||||
Reference in New Issue
Block a user