]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/job-queue/handlers/email.ts
More robust webtorrent redundancy download
[github/Chocobozzz/PeerTube.git] / server / lib / job-queue / handlers / email.ts
index 2ba39a156d805e8e0c1af2c6925410613c80f70b..6fc1caa84bf1a2e64f215458993f178e30e7f44d 100644 (file)
@@ -1,17 +1,9 @@
-import * as Bull from 'bull'
+import { Job } from 'bull'
+import { EmailPayload } from '@shared/models'
 import { logger } from '../../../helpers/logger'
 import { Emailer } from '../../emailer'
 
-export type EmailPayload = {
-  to: string[]
-  subject: string
-  text: string
-
-  fromDisplayName?: string
-  replyTo?: string
-}
-
-async function processEmail (job: Bull.Job) {
+async function processEmail (job: Job) {
   const payload = job.data as EmailPayload
   logger.info('Processing email in job %d.', job.id)