Skip to content

Commit 08327f3

Browse files
authored
th-239: * fix bug with mail views (#363)
1 parent 4158d71 commit 08327f3

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

backend/src/packages/mail/libs/views/driver-credentials/driver-credentials.view.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class DriverCredentialsView extends View implements IView {
1010
public constructor(templateName: TemplateNameValues) {
1111
const templatePath = path.join(
1212
path.dirname(url.fileURLToPath(import.meta.url)),
13-
'libs',
14-
'layout',
13+
'..',
14+
'layouts',
1515
`${templateName}.hbs`,
1616
);
1717
super(templatePath);
File renamed without changes.
File renamed without changes.

backend/src/packages/mail/libs/views/plain/plain.view.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class PlainView extends View implements IView {
1010
public constructor(templateName: TemplateNameValues) {
1111
const templatePath = path.join(
1212
path.dirname(url.fileURLToPath(import.meta.url)),
13-
'libs',
14-
'layout',
13+
'..',
14+
'layouts',
1515
`${templateName}.hbs`,
1616
);
1717
super(templatePath);

prepare-build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ copy_and_clean() {
1111
fi
1212
}
1313

14+
copy_files() {
15+
source_dir="$1"
16+
destination_dir="$2"
17+
18+
if [ -d "$source_dir" ]; then
19+
mkdir -p "$destination_dir"
20+
cp -r "$source_dir"/* "$destination_dir"
21+
fi
22+
}
23+
24+
1425
copy_and_clean "./backend/build" "./build/backend/"
1526
mkdir -p "./build/shared/"
1627
cp -r "./shared/build" "./build/shared/"
@@ -19,3 +30,6 @@ copy_and_clean "./frontend/build" "./build/backend/public"
1930

2031
# Copy package files
2132
cp "package.json" "package-lock.json" "./build/"
33+
34+
# Copy mail layouts
35+
copy_files "./backend/src/packages/mail/libs/views/layouts" "./build/backend/packages/mail/libs/views/layouts"

0 commit comments

Comments
 (0)