Додані повідомлення та перепрацьована структура застосунку та api

This commit is contained in:
2026-03-15 00:25:10 +02:00
parent 85483b85bb
commit 4bc9c11512
101 changed files with 5763 additions and 2546 deletions

View File

@@ -2,16 +2,9 @@ const { updateApartment } = require("../services/apartments.service");
const { updateBuilding } = require("../services/buildings.service");
const { lockingStand, unlockingStand, updateStand } = require("../services/stand.service");
const { broadcast } = require("../utils/broadcaster");
const { pushToMetrics } = require("../middleware/pushToMetrics");
module.exports = async (wss, ws, message) => {
try {
pushToMetrics({
type: "ws_out",
length: message.length,
timestamp: Date.now()
});
switch (message.type) {
case "apartment":
await updateApartment(ws.user, message.data);