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