]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/video-channel.ts
move to boolean switch
[github/Chocobozzz/PeerTube.git] / server / controllers / api / video-channel.ts
index ff6bbe44c0b068ba533fbac53cc283a6b01ae7d7..c84d1be580f8aa44dbafcb7ca618ac093f99029a 100644 (file)
@@ -46,7 +46,7 @@ videoChannelRouter.get('/',
 
 videoChannelRouter.post('/',
   authenticate,
-  videoChannelsAddValidator,
+  asyncMiddleware(videoChannelsAddValidator),
   asyncRetryTransactionMiddleware(addVideoChannel)
 )
 
@@ -56,7 +56,7 @@ videoChannelRouter.post('/:nameWithHost/avatar/pick',
   // Check the rights
   asyncMiddleware(videoChannelsUpdateValidator),
   updateAvatarValidator,
-  asyncRetryTransactionMiddleware(updateVideoChannelAvatar)
+  asyncMiddleware(updateVideoChannelAvatar)
 )
 
 videoChannelRouter.put('/:nameWithHost',
@@ -215,9 +215,11 @@ async function listVideoChannelVideos (req: express.Request, res: express.Respon
     languageOneOf: req.query.languageOneOf,
     tagsOneOf: req.query.tagsOneOf,
     tagsAllOf: req.query.tagsAllOf,
+    filter: req.query.filter,
     nsfw: buildNSFWFilter(res, req.query.nsfw),
     withFiles: false,
-    videoChannelId: videoChannelInstance.id
+    videoChannelId: videoChannelInstance.id,
+    userId: res.locals.oauth ? res.locals.oauth.token.User.id : undefined
   })
 
   return res.json(getFormattedObjects(resultList.data, resultList.total))