mirror of
https://github.com/XploitWizer-Community/XploitSPY.git
synced 2024-11-11 04:49:20 +08:00
15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
|
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();
|
||
|
}
|
||
|
}
|