mirror of
https://github.com/XploitWizer-Community/XploitSPY.git
synced 2024-11-05 18:09:22 +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();
|
||
|
}
|
||
|
}
|