aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-07 17:18:29 +0200
committerChocobozzz <me@florianbigard.com>2022-09-08 08:41:48 +0200
commitd4d9bbc6f24522f5d63b0ab105a02f80ca98d702 (patch)
tree9e7e5e5170cea36a489f6c988df892a34c886937 /server/controllers/api/accounts.ts
parent8b69f9f02879ee3cf72bc9d4aa96cc71f18e6eea (diff)
downloadPeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.gz
PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.tar.zst
PeerTube-d4d9bbc6f24522f5d63b0ab105a02f80ca98d702.zip
Fix channel sync right check
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r--server/controllers/api/accounts.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 7a530cde5..2d86d393c 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -3,6 +3,7 @@ import { pickCommonVideoQuery } from '@server/helpers/query'
3import { ActorFollowModel } from '@server/models/actor/actor-follow' 3import { ActorFollowModel } from '@server/models/actor/actor-follow'
4import { getServerActor } from '@server/models/application/application' 4import { getServerActor } from '@server/models/application/application'
5import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils' 5import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
6import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync'
6import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' 7import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
7import { getFormattedObjects } from '../../helpers/utils' 8import { getFormattedObjects } from '../../helpers/utils'
8import { JobQueue } from '../../lib/job-queue' 9import { JobQueue } from '../../lib/job-queue'
@@ -25,7 +26,7 @@ import {
25 accountsFollowersSortValidator, 26 accountsFollowersSortValidator,
26 accountsSortValidator, 27 accountsSortValidator,
27 ensureAuthUserOwnsAccountValidator, 28 ensureAuthUserOwnsAccountValidator,
28 ensureCanManageUser, 29 ensureCanManageChannelOrAccount,
29 videoChannelsSortValidator, 30 videoChannelsSortValidator,
30 videoChannelStatsValidator, 31 videoChannelStatsValidator,
31 videoChannelSyncsSortValidator, 32 videoChannelSyncsSortValidator,
@@ -37,7 +38,6 @@ import { AccountVideoRateModel } from '../../models/account/account-video-rate'
37import { VideoModel } from '../../models/video/video' 38import { VideoModel } from '../../models/video/video'
38import { VideoChannelModel } from '../../models/video/video-channel' 39import { VideoChannelModel } from '../../models/video/video-channel'
39import { VideoPlaylistModel } from '../../models/video/video-playlist' 40import { VideoPlaylistModel } from '../../models/video/video-playlist'
40import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync'
41 41
42const accountsRouter = express.Router() 42const accountsRouter = express.Router()
43 43
@@ -78,7 +78,7 @@ accountsRouter.get('/:accountName/video-channels',
78accountsRouter.get('/:accountName/video-channel-syncs', 78accountsRouter.get('/:accountName/video-channel-syncs',
79 authenticate, 79 authenticate,
80 asyncMiddleware(accountNameWithHostGetValidator), 80 asyncMiddleware(accountNameWithHostGetValidator),
81 ensureCanManageUser, 81 ensureCanManageChannelOrAccount,
82 paginationValidator, 82 paginationValidator,
83 videoChannelSyncsSortValidator, 83 videoChannelSyncsSortValidator,
84 setDefaultSort, 84 setDefaultSort,