mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Use handle for param name
This commit is contained in:
parent
ade57193ac
commit
6f68db1be9
9 changed files with 34 additions and 41 deletions
|
@ -52,13 +52,13 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName',
|
||||
'/:handle',
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
getAccount
|
||||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/videos',
|
||||
'/:handle/videos',
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
paginationValidator,
|
||||
videosSortValidator,
|
||||
|
@ -70,7 +70,7 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/video-channels',
|
||||
'/:handle/video-channels',
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
videoChannelStatsValidator,
|
||||
paginationValidator,
|
||||
|
@ -81,7 +81,7 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/video-playlists',
|
||||
'/:handle/video-playlists',
|
||||
optionalAuthenticate,
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
paginationValidator,
|
||||
|
@ -94,7 +94,7 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/video-channel-syncs',
|
||||
'/:handle/video-channel-syncs',
|
||||
authenticate,
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
paginationValidator,
|
||||
|
@ -105,7 +105,7 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/ratings',
|
||||
'/:handle/ratings',
|
||||
authenticate,
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
paginationValidator,
|
||||
|
@ -117,7 +117,7 @@ accountsRouter.get(
|
|||
)
|
||||
|
||||
accountsRouter.get(
|
||||
'/:accountName/followers',
|
||||
'/:handle/followers',
|
||||
authenticate,
|
||||
asyncMiddleware(accountHandleGetValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
paginationValidator,
|
||||
|
|
|
@ -76,7 +76,7 @@ videoChannelRouter.get(
|
|||
videoChannelRouter.post('/', authenticate, asyncMiddleware(videoChannelsAddValidator), asyncRetryTransactionMiddleware(createVideoChannel))
|
||||
|
||||
videoChannelRouter.post(
|
||||
'/:nameWithHost/avatar/pick',
|
||||
'/:handle/avatar/pick',
|
||||
authenticate,
|
||||
reqAvatarFile,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
|
@ -85,7 +85,7 @@ videoChannelRouter.post(
|
|||
)
|
||||
|
||||
videoChannelRouter.post(
|
||||
'/:nameWithHost/banner/pick',
|
||||
'/:handle/banner/pick',
|
||||
authenticate,
|
||||
reqBannerFile,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
|
@ -94,21 +94,21 @@ videoChannelRouter.post(
|
|||
)
|
||||
|
||||
videoChannelRouter.delete(
|
||||
'/:nameWithHost/avatar',
|
||||
'/:handle/avatar',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
asyncMiddleware(deleteVideoChannelAvatar)
|
||||
)
|
||||
|
||||
videoChannelRouter.delete(
|
||||
'/:nameWithHost/banner',
|
||||
'/:handle/banner',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
asyncMiddleware(deleteVideoChannelBanner)
|
||||
)
|
||||
|
||||
videoChannelRouter.put(
|
||||
'/:nameWithHost',
|
||||
'/:handle',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
videoChannelsUpdateValidator,
|
||||
|
@ -116,7 +116,7 @@ videoChannelRouter.put(
|
|||
)
|
||||
|
||||
videoChannelRouter.delete(
|
||||
'/:nameWithHost',
|
||||
'/:handle',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
asyncMiddleware(videoChannelsRemoveValidator),
|
||||
|
@ -124,13 +124,13 @@ videoChannelRouter.delete(
|
|||
)
|
||||
|
||||
videoChannelRouter.get(
|
||||
'/:nameWithHost',
|
||||
'/:handle',
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
asyncMiddleware(getVideoChannel)
|
||||
)
|
||||
|
||||
videoChannelRouter.get(
|
||||
'/:nameWithHost/video-playlists',
|
||||
'/:handle/video-playlists',
|
||||
optionalAuthenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
paginationValidator,
|
||||
|
@ -142,7 +142,7 @@ videoChannelRouter.get(
|
|||
)
|
||||
|
||||
videoChannelRouter.get(
|
||||
'/:nameWithHost/videos',
|
||||
'/:handle/videos',
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
paginationValidator,
|
||||
videosSortValidator,
|
||||
|
@ -154,7 +154,7 @@ videoChannelRouter.get(
|
|||
)
|
||||
|
||||
videoChannelRouter.get(
|
||||
'/:nameWithHost/followers',
|
||||
'/:handle/followers',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkManage: true })),
|
||||
paginationValidator,
|
||||
|
@ -165,7 +165,7 @@ videoChannelRouter.get(
|
|||
)
|
||||
|
||||
videoChannelRouter.post(
|
||||
'/:nameWithHost/import-videos',
|
||||
'/:handle/import-videos',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
asyncMiddleware(videoChannelImportVideosValidator),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue