diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-29 15:17:42 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-29 15:17:42 +0100 |
commit | 75ba887d10eacb9cd1392e62f68617c7643c9add (patch) | |
tree | ab8e76cb3239e4a365ded4e65028e91479fc1e57 /server/controllers | |
parent | 0bc1b31d60ed0edf3999f51743b653068ef1816e (diff) | |
download | PeerTube-75ba887d10eacb9cd1392e62f68617c7643c9add.tar.gz PeerTube-75ba887d10eacb9cd1392e62f68617c7643c9add.tar.zst PeerTube-75ba887d10eacb9cd1392e62f68617c7643c9add.zip |
Don't log error on actor delete signature error
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/client.ts | 12 | ||||
-rw-r--r-- | server/controllers/activitypub/inbox.ts | 2 |
2 files changed, 7 insertions, 7 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' |
17 | import { getAccountVideoRateValidator, videoCommentGetValidator } from '../../middlewares/validators' | 17 | import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' |
18 | import { AccountModel } from '../../models/account/account' | 18 | import { AccountModel } from '../../models/account/account' |
19 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 19 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' |
20 | import { VideoModel } from '../../models/video/video' | 20 | import { VideoModel } from '../../models/video/video' |
@@ -63,13 +63,13 @@ activityPubClientRouter.get('/accounts?/:name/playlists', | |||
63 | ) | 63 | ) |
64 | activityPubClientRouter.get('/accounts?/:name/likes/:videoId', | 64 | activityPubClientRouter.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 | ) |
69 | activityPubClientRouter.get('/accounts?/:name/dislikes/:videoId', | 69 | activityPubClientRouter.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 | ||
75 | activityPubClientRouter.get('/videos/watch/:id', | 75 | activityPubClientRouter.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 | ||
195 | function getAccountVideoRate (rateType: VideoRateType) { | 195 | function 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 | ||
diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts index ca42106b8..4fb180003 100644 --- a/server/controllers/activitypub/inbox.ts +++ b/server/controllers/activitypub/inbox.ts | |||
@@ -50,7 +50,7 @@ const inboxQueue = queue<QueueParam, Error>((task, cb) => { | |||
50 | 50 | ||
51 | function inboxController (req: express.Request, res: express.Response) { | 51 | function inboxController (req: express.Request, res: express.Response) { |
52 | const rootActivity: RootActivity = req.body | 52 | const rootActivity: RootActivity = req.body |
53 | let activities: Activity[] = [] | 53 | let activities: Activity[] |
54 | 54 | ||
55 | if ([ 'Collection', 'CollectionPage' ].indexOf(rootActivity.type) !== -1) { | 55 | if ([ 'Collection', 'CollectionPage' ].indexOf(rootActivity.type) !== -1) { |
56 | activities = (rootActivity as ActivityPubCollection).items | 56 | activities = (rootActivity as ActivityPubCollection).items |