aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/emailer.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
committerRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
commitc1e791bad0b079af67398f6407221e6dcbb573dd (patch)
tree82e5944b4458dd35aa482a38f6b650eb93bb89ad /server/lib/emailer.ts
parent5f7021c33d31c5255b995ae0ff86b5bbea4ea4b9 (diff)
downloadPeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.gz
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.zst
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.zip
expliciting type checks and predicates (server only)
Diffstat (limited to 'server/lib/emailer.ts')
-rw-r--r--server/lib/emailer.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 88a06cb79..ded321bf7 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -91,9 +91,10 @@ class Emailer {
91 91
92 async addVideoAbuseReport (videoId: number) { 92 async addVideoAbuseReport (videoId: number) {
93 const video = await VideoModel.load(videoId) 93 const video = await VideoModel.load(videoId)
94 if (!video) throw new Error('Unknown Video id during Abuse report.')
94 95
95 const text = `Hi,\n\n` + 96 const text = `Hi,\n\n` +
96 `Your instance received an abuse for video the following video ${video.url}\n\n` + 97 `Your instance received an abuse for the following video ${video.url}\n\n` +
97 `Cheers,\n` + 98 `Cheers,\n` +
98 `PeerTube.` 99 `PeerTube.`
99 100