fix: change root directory.

This commit is contained in:
a.bouhuolia
2023-02-03 15:13:16 +02:00
parent 80b97b5fdc
commit 32543b8762
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import path from 'path';
import moment from 'moment';
global.__root_dir = path.join(__dirname, '..');
global.__resources_dir = path.join(global.__root, 'resources');
global.__resources_dir = path.join(global.__root_dir, 'resources');
global.__locales_dir = path.join(global.__resources_dir, 'locales');
moment.prototype.toMySqlDateTime = function () {

View File

@@ -109,7 +109,7 @@ export default class Mail {
* Retrieve view content from the view directory.
*/
private getViewContent(): string {
const filePath = path.join(global.__root, `../views/${this.view}`);
const filePath = path.join(global.__root_dir, `../views/${this.view}`);
return fs.readFileSync(filePath, 'utf8');
}
}