mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 18:26:37 +02:00
refactor: remove util.promisify calls
This commit is contained in:
@@ -4,9 +4,6 @@ require('colors');
|
||||
const path = require('path');
|
||||
const winston = require('winston');
|
||||
const fs = require('fs');
|
||||
const util = require('util');
|
||||
|
||||
const fsAccessAsync = util.promisify(fs.access);
|
||||
|
||||
const db = require('../database');
|
||||
const events = require('../events');
|
||||
@@ -100,7 +97,7 @@ async function resetSettings() {
|
||||
|
||||
async function resetTheme(themeId) {
|
||||
try {
|
||||
await fsAccessAsync(path.join(dirname, 'node_modules', themeId, 'package.json'));
|
||||
await fs.promises.access(path.join(dirname, 'node_modules', themeId, 'package.json'));
|
||||
} catch (err) {
|
||||
winston.warn('[reset] Theme `%s` is not installed on this forum', themeId);
|
||||
throw new Error('theme-not-found');
|
||||
|
||||
Reference in New Issue
Block a user