diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 10:35:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 10:35:15 +0100 |
commit | dae86118ed5d4026d04acb9d0e36829b9ad8eb4e (patch) | |
tree | a5bf9c4487240bf75a9b328cad459a0587f90dea /server/controllers/api/videos/blacklist.ts | |
parent | e65c0c5b1fab9c3d93f51721b2458cf5cf471f20 (diff) | |
download | PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.gz PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.tar.zst PeerTube-dae86118ed5d4026d04acb9d0e36829b9ad8eb4e.zip |
Cleanup express locals typings
Diffstat (limited to 'server/controllers/api/videos/blacklist.ts')
-rw-r--r-- | server/controllers/api/videos/blacklist.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts index b01296200..d0728eb59 100644 --- a/server/controllers/api/videos/blacklist.ts +++ b/server/controllers/api/videos/blacklist.ts | |||
@@ -17,7 +17,6 @@ import { | |||
17 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' | 17 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' |
18 | import { sequelizeTypescript } from '../../../initializers' | 18 | import { sequelizeTypescript } from '../../../initializers' |
19 | import { Notifier } from '../../../lib/notifier' | 19 | import { Notifier } from '../../../lib/notifier' |
20 | import { VideoModel } from '../../../models/video/video' | ||
21 | import { sendDeleteVideo } from '../../../lib/activitypub/send' | 20 | import { sendDeleteVideo } from '../../../lib/activitypub/send' |
22 | import { federateVideoIfNeeded } from '../../../lib/activitypub' | 21 | import { federateVideoIfNeeded } from '../../../lib/activitypub' |
23 | 22 | ||
@@ -87,7 +86,7 @@ async function addVideoToBlacklist (req: express.Request, res: express.Response) | |||
87 | } | 86 | } |
88 | 87 | ||
89 | async function updateVideoBlacklistController (req: express.Request, res: express.Response) { | 88 | async function updateVideoBlacklistController (req: express.Request, res: express.Response) { |
90 | const videoBlacklist = res.locals.videoBlacklist as VideoBlacklistModel | 89 | const videoBlacklist = res.locals.videoBlacklist |
91 | 90 | ||
92 | if (req.body.reason !== undefined) videoBlacklist.reason = req.body.reason | 91 | if (req.body.reason !== undefined) videoBlacklist.reason = req.body.reason |
93 | 92 | ||
@@ -105,8 +104,8 @@ async function listBlacklist (req: express.Request, res: express.Response, next: | |||
105 | } | 104 | } |
106 | 105 | ||
107 | async function removeVideoFromBlacklistController (req: express.Request, res: express.Response, next: express.NextFunction) { | 106 | async function removeVideoFromBlacklistController (req: express.Request, res: express.Response, next: express.NextFunction) { |
108 | const videoBlacklist = res.locals.videoBlacklist as VideoBlacklistModel | 107 | const videoBlacklist = res.locals.videoBlacklist |
109 | const video: VideoModel = res.locals.video | 108 | const video = res.locals.video |
110 | 109 | ||
111 | await sequelizeTypescript.transaction(async t => { | 110 | await sequelizeTypescript.transaction(async t => { |
112 | const unfederated = videoBlacklist.unfederated | 111 | const unfederated = videoBlacklist.unfederated |