refactor: move als requires, move autoLocale to api/page routes

This commit is contained in:
Barış Soner Uşaklı
2024-06-10 20:43:22 -04:00
parent 8eccdb481f
commit 3356022a85
4 changed files with 7 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
const winston = require('winston');
const plugins = require('.');
const utils = require('../utils');
const als = require('../als');
const Hooks = module.exports;
@@ -185,7 +186,6 @@ Hooks.fire = async function (hook, params) {
}
let deleteCaller = false;
if (params && typeof params === 'object' && !Array.isArray(params) && !params.hasOwnProperty('caller')) {
const als = require('../als');
params.caller = als.getStore();
deleteCaller = true;
}