chore: enable formatting over the entire codebase in CI (#6655)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Frank Elsinga
2026-01-09 02:10:36 +01:00
committed by GitHub
co-authored by autofix-ci[bot]
parent 6658f2ce41
commit 0f61d7ee1b
422 changed files with 30897 additions and 27377 deletions
+9 -28
View File
@@ -207,19 +207,9 @@ class Notification {
* @returns {Promise<string>} Successful msg
* @throws Error with fail msg
*/
static async send(
notification,
msg,
monitorJSON = null,
heartbeatJSON = null
) {
static async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
if (this.providerList[notification.type]) {
return this.providerList[notification.type].send(
notification,
msg,
monitorJSON,
heartbeatJSON
);
return this.providerList[notification.type].send(notification, msg, monitorJSON, heartbeatJSON);
} else {
throw new Error("Notification type is not supported");
}
@@ -236,10 +226,7 @@ class Notification {
let bean;
if (notificationID) {
bean = await R.findOne("notification", " id = ? AND user_id = ? ", [
notificationID,
userID,
]);
bean = await R.findOne("notification", " id = ? AND user_id = ? ", [notificationID, userID]);
if (!bean) {
throw new Error("notification not found");
@@ -268,10 +255,7 @@ class Notification {
* @returns {Promise<void>}
*/
static async delete(notificationID, userID) {
let bean = await R.findOne("notification", " id = ? AND user_id = ? ", [
notificationID,
userID,
]);
let bean = await R.findOne("notification", " id = ? AND user_id = ? ", [notificationID, userID]);
if (!bean) {
throw new Error("notification not found");
@@ -296,16 +280,13 @@ class Notification {
* @returns {Promise<void>}
*/
async function applyNotificationEveryMonitor(notificationID, userID) {
let monitors = await R.getAll("SELECT id FROM monitor WHERE user_id = ?", [
userID,
]);
let monitors = await R.getAll("SELECT id FROM monitor WHERE user_id = ?", [userID]);
for (let i = 0; i < monitors.length; i++) {
let checkNotification = await R.findOne(
"monitor_notification",
" monitor_id = ? AND notification_id = ? ",
[ monitors[i].id, notificationID ]
);
let checkNotification = await R.findOne("monitor_notification", " monitor_id = ? AND notification_id = ? ", [
monitors[i].id,
notificationID,
]);
if (!checkNotification) {
let relation = R.dispense("monitor_notification");