mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: use async
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user