mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: use async/await
This commit is contained in:
@@ -45,6 +45,6 @@ Config.setMultiple = async function (socket, data) {
|
||||
}
|
||||
};
|
||||
|
||||
Config.remove = function (socket, key, callback) {
|
||||
meta.configs.remove(key, callback);
|
||||
Config.remove = async function (socket, key) {
|
||||
await meta.configs.remove(key);
|
||||
};
|
||||
|
||||
@@ -4,6 +4,6 @@ const meta = require('../../meta');
|
||||
|
||||
const Errors = module.exports;
|
||||
|
||||
Errors.clear = function (socket, data, callback) {
|
||||
meta.errors.clear(callback);
|
||||
Errors.clear = async function () {
|
||||
await meta.errors.clear();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user