]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-live.ts
Fetch directly all video attributes for get API
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-live.ts
index ffc8c47b3b2997bc7c11a8a565b08c01d82e13c6..b058ff5c189a91968c68ea149117c2d06df3073d 100644 (file)
@@ -72,7 +72,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([
 
       return res.fail({
         status: HttpStatusCode.FORBIDDEN_403,
-        message: 'Live is not enabled on this instance'
+        message: 'Live is not enabled on this instance',
+        type: ServerErrorCode.LIVE_NOT_ENABLED
       })
     }
 
@@ -81,7 +82,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([
 
       return res.fail({
         status: HttpStatusCode.FORBIDDEN_403,
-        message: 'Saving live replay is not allowed instance'
+        message: 'Saving live replay is not enabled on this instance',
+        type: ServerErrorCode.LIVE_NOT_ALLOWING_REPLAY
       })
     }
 
@@ -116,8 +118,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([
 
         return res.fail({
           status: HttpStatusCode.FORBIDDEN_403,
-          type: ServerErrorCode.MAX_USER_LIVES_LIMIT_REACHED,
-          message: 'Cannot create this live because the max user lives limit is reached.'
+          message: 'Cannot create this live because the max user lives limit is reached.',
+          type: ServerErrorCode.MAX_USER_LIVES_LIMIT_REACHED
         })
       }
     }