Змінено директорії

Додано скрипти CRON
Поліпшено механізм запису стендів та їх редагування
This commit is contained in:
2025-10-27 00:11:18 +02:00
parent 1d9f9a1468
commit 04f39da611
196 changed files with 4962 additions and 4065 deletions

View File

@@ -1,4 +1,5 @@
const db = require("../config/db");
const Notification = require("../utils/notification.js");
class HistoryEntranceService {
getHistoryEntrance(entrance_id) {
@@ -58,6 +59,21 @@ class HistoryEntranceService {
} else if (this.changes === 0) {
return res(false);
} else {
if (Number(data.sheep_id) > 0) {
Notification.sendSheep({
sheep_id: Number(data.sheep_id),
title: "Нова територія",
body: "Вам призначено нову територію"
});
} else if (Number(data.sheep_id) == 0 && Number(data.group_id) > 0) {
Notification.sendGroup({
group_id: Number(data.group_id),
title: "Нова територія",
body: "Призначено нову групову територію"
});
}
res({ "create": "ok", "id": this.lastID });
}
});