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 () {
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;
Logs.get = function (socket, data, callback) {
meta.logs.get(callback);
Logs.get = async function () {
return await meta.logs.get();
};
Logs.clear = function (socket, data, callback) {
meta.logs.clear(callback);
Logs.clear = function () {
return await meta.logs.clear();
};

Loading…
Cancel
Save