Svelte UI Update

This commit is contained in:
2024-03-23 14:56:45 +03:00
parent f24a0f8518
commit f51cb15da7
35 changed files with 314 additions and 39 deletions

View File

@@ -0,0 +1,29 @@
const configs = require("../configs");
const Library = require("../library");
const logSave = async (
token,
device_id,
remote_name,
remote_type,
operating_type
) => {
if (token === configs.verifyToken) {
try {
const result = await Library.saveDeviceLog(
device_id,
remote_name,
remote_type,
operating_type
);
return result;
} catch (error) {
throw new Error("Mongodb'ye kaydedilirken hata oluştu (log.controller)");
}
} else {
throw new Error("Hatalı token (log.controller)");
}
};
module.exports = { logSave };