mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add channel collaborators feature
This commit is contained in:
parent
94e55dfc6c
commit
135d5c7363
185 changed files with 5457 additions and 2631 deletions
|
@ -1,4 +1,5 @@
|
|||
import { PlayerChannelSettingsUpdate, PlayerVideoSettingsUpdate } from '@peertube/peertube-models'
|
||||
import { sendUpdateChannelPlayerSettings, sendUpdateVideoPlayerSettings } from '@server/lib/activitypub/send/send-update.js'
|
||||
import { upsertPlayerSettings } from '@server/lib/player-settings.js'
|
||||
import {
|
||||
getChannelPlayerSettingsValidator,
|
||||
|
@ -15,7 +16,6 @@ import {
|
|||
optionalAuthenticate,
|
||||
videoChannelsHandleValidatorFactory
|
||||
} from '../../middlewares/index.js'
|
||||
import { sendUpdateChannelPlayerSettings, sendUpdateVideoPlayerSettings } from '@server/lib/activitypub/send/send-update.js'
|
||||
|
||||
const playerSettingsRouter = express.Router()
|
||||
|
||||
|
@ -39,7 +39,7 @@ playerSettingsRouter.put(
|
|||
playerSettingsRouter.get(
|
||||
'/video-channels/:handle',
|
||||
optionalAuthenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkManage: false })),
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: false, checkCanManage: false, checkIsOwner: false })),
|
||||
getChannelPlayerSettingsValidator,
|
||||
asyncMiddleware(getChannelPlayerSettings)
|
||||
)
|
||||
|
@ -47,7 +47,7 @@ playerSettingsRouter.get(
|
|||
playerSettingsRouter.put(
|
||||
'/video-channels/:handle',
|
||||
authenticate,
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkManage: true })),
|
||||
asyncMiddleware(videoChannelsHandleValidatorFactory({ checkIsLocal: true, checkCanManage: true, checkIsOwner: false })),
|
||||
updatePlayerSettingsValidatorFactory('channel'),
|
||||
asyncMiddleware(updateChannelPlayerSettings)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue