aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/activitypub/client.ts')
-rw-r--r--server/controllers/activitypub/client.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 62412cd62..95c2a26a6 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -14,7 +14,7 @@ import {
14 videosCustomGetValidator, 14 videosCustomGetValidator,
15 videosShareValidator 15 videosShareValidator
16} from '../../middlewares' 16} from '../../middlewares'
17import { getAccountVideoRateValidator, videoCommentGetValidator } from '../../middlewares/validators' 17import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators'
18import { AccountModel } from '../../models/account/account' 18import { AccountModel } from '../../models/account/account'
19import { ActorFollowModel } from '../../models/activitypub/actor-follow' 19import { ActorFollowModel } from '../../models/activitypub/actor-follow'
20import { VideoModel } from '../../models/video/video' 20import { VideoModel } from '../../models/video/video'
@@ -63,13 +63,13 @@ activityPubClientRouter.get('/accounts?/:name/playlists',
63) 63)
64activityPubClientRouter.get('/accounts?/:name/likes/:videoId', 64activityPubClientRouter.get('/accounts?/:name/likes/:videoId',
65 executeIfActivityPub, 65 executeIfActivityPub,
66 asyncMiddleware(getAccountVideoRateValidator('like')), 66 asyncMiddleware(getAccountVideoRateValidatorFactory('like')),
67 getAccountVideoRate('like') 67 getAccountVideoRateFactory('like')
68) 68)
69activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId', 69activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId',
70 executeIfActivityPub, 70 executeIfActivityPub,
71 asyncMiddleware(getAccountVideoRateValidator('dislike')), 71 asyncMiddleware(getAccountVideoRateValidatorFactory('dislike')),
72 getAccountVideoRate('dislike') 72 getAccountVideoRateFactory('dislike')
73) 73)
74 74
75activityPubClientRouter.get('/videos/watch/:id', 75activityPubClientRouter.get('/videos/watch/:id',
@@ -192,7 +192,7 @@ async function accountPlaylistsController (req: express.Request, res: express.Re
192 return activityPubResponse(activityPubContextify(activityPubResult), res) 192 return activityPubResponse(activityPubContextify(activityPubResult), res)
193} 193}
194 194
195function getAccountVideoRate (rateType: VideoRateType) { 195function getAccountVideoRateFactory (rateType: VideoRateType) {
196 return (req: express.Request, res: express.Response) => { 196 return (req: express.Request, res: express.Response) => {
197 const accountVideoRate = res.locals.accountVideoRate 197 const accountVideoRate = res.locals.accountVideoRate
198 198