refactor: use async

isekai-main
Barış Soner Uşaklı 3 years ago
parent e3c0f0be0a
commit 8491f67daf

@ -12,5 +12,5 @@ Logs.get = async function () {
}; };
Logs.clear = async function () { Logs.clear = async function () {
return await fs.promises.truncate(Logs.path, 0); await fs.promises.truncate(Logs.path, 0);
}; };

@ -4,10 +4,10 @@ const meta = require('../../meta');
const Logs = module.exports; const Logs = module.exports;
Logs.get = function (socket, data, callback) { Logs.get = async function () {
meta.logs.get(callback); return await meta.logs.get();
}; };
Logs.clear = function (socket, data, callback) { Logs.clear = function () {
meta.logs.clear(callback); return await meta.logs.clear();
}; };

Loading…
Cancel
Save