X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Femailer.ts;h=c08732b4833de362798a3afeedb9a7dbeebea050;hb=d473fd94ce2fd04bffc6cf6ee8f193db309c1d83;hp=935c9e882ca15f5715888d333a9e8cbff53a203a;hpb=df4c603dea022146476812cbbc2b9f8f1e5e4870;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 935c9e882..c08732b48 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -12,9 +12,9 @@ import { MVideoAccountLight, MVideoBlacklistLightVideo, MVideoBlacklistVideo -} from '../typings/models/video' -import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' -import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' +} from '../types/models/video' +import { MActorFollowActors, MActorFollowFull, MUser } from '../types/models' +import { MVideoImport, MVideoImportVideo } from '@server/types/models/video/video-import' import { EmailPayload } from '@shared/models' import { join } from 'path' import { VideoAbuse } from '../../shared/models/videos' @@ -473,7 +473,7 @@ class Emailer { }, transport: this.transporter, views: { - root: join(root(), 'server', 'lib', 'emails') + root: join(root(), 'dist', 'server', 'lib', 'emails') }, subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX }) @@ -498,8 +498,8 @@ class Emailer { }, options // overriden/new variables given for a specific template in the payload ) as SendEmailOptions) - .then(logger.info) - .catch(logger.error) + .then(res => logger.debug('Sent email.', { res })) + .catch(err => logger.error('Error in email sender.', { err })) } }