]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/emailer.ts
allow muting from the miniature options
[github/Chocobozzz/PeerTube.git] / server / lib / emailer.ts
index 935c9e882ca15f5715888d333a9e8cbff53a203a..c08732b4833de362798a3afeedb9a7dbeebea050 100644 (file)
@@ -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 }))
     }
   }