Skip to content

Commit

Permalink
remove async from promise execution
Browse files Browse the repository at this point in the history
  • Loading branch information
dbauszus-glx committed Oct 20, 2023
1 parent d771f95 commit 9795478
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mod/templates/_templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ module.exports = async (key, language = 'en', params = {}) => {
// Prevent prototype polluting assignment.
if (/__proto__/.test(key)) return;

const custom_templates = await new Promise(async (resolve, reject)=>{
const custom_templates = await new Promise((resolve)=>{

if (!process.env.CUSTOM_TEMPLATES) return resolve({})

resolve(await getFrom[process.env.CUSTOM_TEMPLATES.split(':')[0]](process.env.CUSTOM_TEMPLATES))
resolve(getFrom[process.env.CUSTOM_TEMPLATES.split(':')[0]](process.env.CUSTOM_TEMPLATES))
})

const templates = merge({},
Expand Down
4 changes: 2 additions & 2 deletions mod/workspace/_workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ const clone = require('../utils/clone.js')

const Roles = require('../utils/roles.js')

const merge = require('../utils/merge')
//const merge = require('../utils/merge')

const _getLayer = require('./getLayer')

const getTemplate = require('./getTemplate')
//const getTemplate = require('./getTemplate')

module.exports = async (req, res) => {

Expand Down

0 comments on commit 9795478

Please sign in to comment.