diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-04 16:14:33 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-04 16:18:01 +0100 |
commit | 2c8776fc316da9719e5ebc55dfabdcac9e197ac4 (patch) | |
tree | b8e8365092437ee69f2ef88d0e9d858fae15ec45 /server/controllers/activitypub | |
parent | 943e5193905908dd1f2800d8810c635d86e3b28f (diff) | |
download | PeerTube-2c8776fc316da9719e5ebc55dfabdcac9e197ac4.tar.gz PeerTube-2c8776fc316da9719e5ebc55dfabdcac9e197ac4.tar.zst PeerTube-2c8776fc316da9719e5ebc55dfabdcac9e197ac4.zip |
Optimize view endpoint
Diffstat (limited to 'server/controllers/activitypub')
-rw-r--r-- | server/controllers/activitypub/client.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index 9a5fd6084..395cfa0d5 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | // Intercept ActivityPub client requests | ||
2 | import * as express from 'express' | 1 | import * as express from 'express' |
3 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' | 2 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' |
4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' | 3 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' |
@@ -37,10 +36,12 @@ import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | |||
37 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | 36 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' |
38 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 37 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
39 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | 38 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' |
40 | import { MAccountId, MActorId, MVideo, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models' | 39 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId } from '@server/typings/models' |
41 | 40 | ||
42 | const activityPubClientRouter = express.Router() | 41 | const activityPubClientRouter = express.Router() |
43 | 42 | ||
43 | // Intercept ActivityPub client requests | ||
44 | |||
44 | activityPubClientRouter.get('/accounts?/:name', | 45 | activityPubClientRouter.get('/accounts?/:name', |
45 | executeIfActivityPub, | 46 | executeIfActivityPub, |
46 | asyncMiddleware(localAccountValidator), | 47 | asyncMiddleware(localAccountValidator), |