feat: use assetBaseUrl instead of hardcoding

This commit is contained in:
Barış Soner Uşaklı
2020-08-11 11:09:46 -04:00
parent 3f01f4a2b8
commit 6e91885836

View File

@@ -197,7 +197,7 @@ module.exports = function (middleware) {
if (languageCodes.includes(userLang) && languages.timeagoCodes.includes(timeagoCode)) {
const pathToLocaleFile = '/vendor/jquery/timeago/locales/jquery.timeago.' + timeagoCode + '.js';
return nconf.get('relative_path') + '/assets' + pathToLocaleFile;
return res.locals.config.assetBaseUrl + pathToLocaleFile;
}
return false;
})(),