aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-06-02 14:28:30 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-02 16:57:07 +0200
commit81628e5069e0168b11857f276fe8e03b93102dde (patch)
treee83cae17853a2e92817c65472a9f63b8e058a5be /server/middlewares/validators/videos
parent3866ea02d4a5c8e4c69a5d8633a883e3733414b9 (diff)
downloadPeerTube-81628e5069e0168b11857f276fe8e03b93102dde.tar.gz
PeerTube-81628e5069e0168b11857f276fe8e03b93102dde.tar.zst
PeerTube-81628e5069e0168b11857f276fe8e03b93102dde.zip
refactor error code values for URI compatibility
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index fd0e543f1..64e09234e 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -252,7 +252,7 @@ async function checkVideoFollowConstraints (req: express.Request, res: express.R
252 252
253 return res.fail({ 253 return res.fail({
254 status: HttpStatusCode.FORBIDDEN_403, 254 status: HttpStatusCode.FORBIDDEN_403,
255 message: 'Cannot get this video regarding follow constraints.', 255 message: 'Cannot get this video regarding follow constraints',
256 type: ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS, 256 type: ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS,
257 data: { 257 data: {
258 originUrl: video.url 258 originUrl: video.url
@@ -285,11 +285,11 @@ const videosCustomGetValidator = (
285 285
286 const user = res.locals.oauth ? res.locals.oauth.token.User : null 286 const user = res.locals.oauth ? res.locals.oauth.token.User : null
287 287
288 // Only the owner or a user that have blacklist rights can see the video 288 // Only the owner or a user that have blocklist rights can see the video
289 if (!user || !user.canGetVideo(video)) { 289 if (!user || !user.canGetVideo(video)) {
290 return res.fail({ 290 return res.fail({
291 status: HttpStatusCode.FORBIDDEN_403, 291 status: HttpStatusCode.FORBIDDEN_403,
292 message: 'Cannot get this private/internal or blacklisted video.' 292 message: 'Cannot get this private/internal or blocklisted video'
293 }) 293 })
294 } 294 }
295 295