Files
NetBird-UptimeKuma/shared.js
La Programmatrice Verde 69f90e7a34
All checks were successful
Compila e pubblica sul registro integrato / Build-Docker-Image (push) Successful in 8m22s
Dimensione massima log
2026-01-04 15:35:25 +01:00

36 lines
706 B
JavaScript

const dayjs = require("dayjs");
let utc = require("dayjs/plugin/utc");
let timezone = require("dayjs/plugin/timezone");
module.exports = {
token: "",
codiciNonAccettati: [401, 404],
setToken(token) {
this.token = token;
},
getToken() {
return this.token;
},
hosts: [],
setHosts(hosts) {
this.hosts = hosts;
},
getHosts() {
return this.hosts;
},
eventEmitter: {},
now() {
dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.tz.setDefault(dayjs.tz.guess());
return dayjs().format("DD/MM/YYYY HH:mm:ss");
},
maxLogSize: 10,
setMaxLogSize(maxLogSize) {
this.maxLogSize = maxLogSize;
},
getMaxLogSize() {
return this.maxLogSize;
},
};