XploitSPY/server/includes/logManager.js

15 lines
402 B
JavaScript
Raw Normal View History

2020-01-11 23:35:37 +08:00
const db = require('./databaseGateway');
module.exports = {
log: (type, message) => {
db.maindb.get('admin.logs').push({
"time": new Date(),
type: type.name,
message
}).write();
console.log(type.name, message);
},
getLogs: () => {
return db.maindb.get('admin.logs').sortBy('time').reverse().value();
}
}