diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/client.ts | 38 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 |
2 files changed, 20 insertions, 20 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index df2a01d2c..d85d0aa5f 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -1,11 +1,22 @@ | |||
1 | import * as express from 'express' | ||
2 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | ||
3 | import { getRateUrl } from '@server/lib/activitypub/video-rates' | ||
4 | import { getServerActor } from '@server/models/application/application' | ||
5 | import { MAccountId, MActorId, MChannelId, MVideoId } from '@server/types/models' | ||
3 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' | 6 | import { VideoPrivacy, VideoRateType } from '../../../shared/models/videos' |
7 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | ||
4 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' | 8 | import { activityPubCollectionPagination, activityPubContextify } from '../../helpers/activitypub' |
5 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' | 9 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../../initializers/constants' |
6 | import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send' | ||
7 | import { audiencify, getAudience } from '../../lib/activitypub/audience' | 10 | import { audiencify, getAudience } from '../../lib/activitypub/audience' |
11 | import { buildAnnounceWithVideoAudience, buildLikeActivity } from '../../lib/activitypub/send' | ||
8 | import { buildCreateActivity } from '../../lib/activitypub/send/send-create' | 12 | import { buildCreateActivity } from '../../lib/activitypub/send/send-create' |
13 | import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | ||
14 | import { | ||
15 | getVideoCommentsActivityPubUrl, | ||
16 | getVideoDislikesActivityPubUrl, | ||
17 | getVideoLikesActivityPubUrl, | ||
18 | getVideoSharesActivityPubUrl | ||
19 | } from '../../lib/activitypub/url' | ||
9 | import { | 20 | import { |
10 | asyncMiddleware, | 21 | asyncMiddleware, |
11 | executeIfActivityPub, | 22 | executeIfActivityPub, |
@@ -14,30 +25,19 @@ import { | |||
14 | videosCustomGetValidator, | 25 | videosCustomGetValidator, |
15 | videosShareValidator | 26 | videosShareValidator |
16 | } from '../../middlewares' | 27 | } from '../../middlewares' |
28 | import { cacheRoute } from '../../middlewares/cache' | ||
17 | import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' | 29 | import { getAccountVideoRateValidatorFactory, videoCommentGetValidator } from '../../middlewares/validators' |
30 | import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy' | ||
31 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | ||
18 | import { AccountModel } from '../../models/account/account' | 32 | import { AccountModel } from '../../models/account/account' |
33 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | ||
19 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 34 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' |
20 | import { VideoModel } from '../../models/video/video' | 35 | import { VideoModel } from '../../models/video/video' |
36 | import { VideoCaptionModel } from '../../models/video/video-caption' | ||
21 | import { VideoCommentModel } from '../../models/video/video-comment' | 37 | import { VideoCommentModel } from '../../models/video/video-comment' |
38 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | ||
22 | import { VideoShareModel } from '../../models/video/video-share' | 39 | import { VideoShareModel } from '../../models/video/video-share' |
23 | import { cacheRoute } from '../../middlewares/cache' | ||
24 | import { activityPubResponse } from './utils' | 40 | import { activityPubResponse } from './utils' |
25 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | ||
26 | import { | ||
27 | getVideoCommentsActivityPubUrl, | ||
28 | getVideoDislikesActivityPubUrl, | ||
29 | getVideoLikesActivityPubUrl, | ||
30 | getVideoSharesActivityPubUrl | ||
31 | } from '../../lib/activitypub/url' | ||
32 | import { VideoCaptionModel } from '../../models/video/video-caption' | ||
33 | import { videoFileRedundancyGetValidator, videoPlaylistRedundancyGetValidator } from '../../middlewares/validators/redundancy' | ||
34 | import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | ||
35 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | ||
36 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | ||
37 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | ||
38 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId, MChannelId } from '@server/types/models' | ||
39 | import { getServerActor } from '@server/models/application/application' | ||
40 | import { getRateUrl } from '@server/lib/activitypub/video-rates' | ||
41 | 41 | ||
42 | const activityPubClientRouter = express.Router() | 42 | const activityPubClientRouter = express.Router() |
43 | activityPubClientRouter.use(cors()) | 43 | activityPubClientRouter.use(cors()) |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 50e769e77..ff29e584b 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -9,7 +9,7 @@ import { getVideoActivityPubUrl } from '@server/lib/activitypub/url' | |||
9 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 9 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
10 | import { getVideoFilePath } from '@server/lib/video-paths' | 10 | import { getVideoFilePath } from '@server/lib/video-paths' |
11 | import { getServerActor } from '@server/models/application/application' | 11 | import { getServerActor } from '@server/models/application/application' |
12 | import { MVideoDetails, MVideoFullLight } from '@server/types/models' | 12 | import { MVideoFullLight } from '@server/types/models' |
13 | import { VideoCreate, VideoState, VideoUpdate } from '../../../../shared' | 13 | import { VideoCreate, VideoState, VideoUpdate } from '../../../../shared' |
14 | import { VideoFilter } from '../../../../shared/models/videos/video-query.type' | 14 | import { VideoFilter } from '../../../../shared/models/videos/video-query.type' |
15 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' | 15 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' |