aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
commit690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch)
treeb16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /server/lib/emailer.ts
parentbbd5aa7ead5f1554a0872963f957effc26d8c630 (diff)
downloadPeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip
Prefer using Object.values
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 3cdba5c76..39b662eb2 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -2,8 +2,7 @@ import { readFileSync } from 'fs-extra'
2import { merge } from 'lodash' 2import { merge } from 'lodash'
3import { createTransport, Transporter } from 'nodemailer' 3import { createTransport, Transporter } from 'nodemailer'
4import { join } from 'path' 4import { join } from 'path'
5import { toArray } from '@server/helpers/custom-validators/misc' 5import { arrayify, root } from '@shared/core-utils'
6import { root } from '@shared/core-utils'
7import { EmailPayload } from '@shared/models' 6import { EmailPayload } from '@shared/models'
8import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model' 7import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model'
9import { isTestOrDevInstance } from '../helpers/core-utils' 8import { isTestOrDevInstance } from '../helpers/core-utils'
@@ -159,7 +158,7 @@ class Emailer {
159 subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX 158 subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX
160 }) 159 })
161 160
162 const toEmails = toArray(options.to) 161 const toEmails = arrayify(options.to)
163 162
164 for (const to of toEmails) { 163 for (const to of toEmails) {
165 const baseOptions: SendEmailDefaultOptions = { 164 const baseOptions: SendEmailDefaultOptions = {