diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-02 09:21:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-02 09:21:33 +0200 |
commit | 03fc19281b476f29b315083f373ca1a1fd4487f9 (patch) | |
tree | abf562bb8eba8f0902e337aa53f523ee0116d98f | |
parent | fa11e79d4ad9211848938af490493078437bf500 (diff) | |
download | PeerTube-03fc19281b476f29b315083f373ca1a1fd4487f9.tar.gz PeerTube-03fc19281b476f29b315083f373ca1a1fd4487f9.tar.zst PeerTube-03fc19281b476f29b315083f373ca1a1fd4487f9.zip |
Fix emails
-rwxr-xr-x | scripts/build/server.sh | 1 | ||||
-rw-r--r-- | server/lib/emailer.ts | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/build/server.sh b/scripts/build/server.sh index 2ec83a3e1..b903f8250 100755 --- a/scripts/build/server.sh +++ b/scripts/build/server.sh | |||
@@ -7,3 +7,4 @@ rm -rf ./dist | |||
7 | npm run tsc | 7 | npm run tsc |
8 | cp "./tsconfig.json" "./dist" | 8 | cp "./tsconfig.json" "./dist" |
9 | cp -r "./server/static" "./server/assets" "./dist/server" | 9 | cp -r "./server/static" "./server/assets" "./dist/server" |
10 | cp -r "./server/lib/emails" "./dist/server/lib" | ||
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 935c9e882..04aade83a 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts | |||
@@ -473,7 +473,7 @@ class Emailer { | |||
473 | }, | 473 | }, |
474 | transport: this.transporter, | 474 | transport: this.transporter, |
475 | views: { | 475 | views: { |
476 | root: join(root(), 'server', 'lib', 'emails') | 476 | root: join(root(), 'dist', 'server', 'lib', 'emails') |
477 | }, | 477 | }, |
478 | subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX | 478 | subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX |
479 | }) | 479 | }) |
@@ -498,8 +498,8 @@ class Emailer { | |||
498 | }, | 498 | }, |
499 | options // overriden/new variables given for a specific template in the payload | 499 | options // overriden/new variables given for a specific template in the payload |
500 | ) as SendEmailOptions) | 500 | ) as SendEmailOptions) |
501 | .then(logger.info) | 501 | .then(res => logger.debug('Sent email.', { res })) |
502 | .catch(logger.error) | 502 | .catch(err => logger.error('Error in email sender.', { err })) |
503 | } | 503 | } |
504 | } | 504 | } |
505 | 505 | ||