diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-06 10:21:06 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-06 10:21:06 +0200 |
commit | c756bae079e02873f6433582ca14a092fec0db27 (patch) | |
tree | 2b24e065144fdb11b8b1ef58ef3157530bd6b2d1 /server/middlewares/validators/videos/video-live.ts | |
parent | fc21ef5c62d845576a916414468b3a57370a57b2 (diff) | |
download | PeerTube-c756bae079e02873f6433582ca14a092fec0db27.tar.gz PeerTube-c756bae079e02873f6433582ca14a092fec0db27.tar.zst PeerTube-c756bae079e02873f6433582ca14a092fec0db27.zip |
add video upload types, add doc middleware to more routes
Diffstat (limited to 'server/middlewares/validators/videos/video-live.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-live.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/middlewares/validators/videos/video-live.ts b/server/middlewares/validators/videos/video-live.ts index ffc8c47b3..b058ff5c1 100644 --- a/server/middlewares/validators/videos/video-live.ts +++ b/server/middlewares/validators/videos/video-live.ts | |||
@@ -72,7 +72,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([ | |||
72 | 72 | ||
73 | return res.fail({ | 73 | return res.fail({ |
74 | status: HttpStatusCode.FORBIDDEN_403, | 74 | status: HttpStatusCode.FORBIDDEN_403, |
75 | message: 'Live is not enabled on this instance' | 75 | message: 'Live is not enabled on this instance', |
76 | type: ServerErrorCode.LIVE_NOT_ENABLED | ||
76 | }) | 77 | }) |
77 | } | 78 | } |
78 | 79 | ||
@@ -81,7 +82,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([ | |||
81 | 82 | ||
82 | return res.fail({ | 83 | return res.fail({ |
83 | status: HttpStatusCode.FORBIDDEN_403, | 84 | status: HttpStatusCode.FORBIDDEN_403, |
84 | message: 'Saving live replay is not allowed instance' | 85 | message: 'Saving live replay is not enabled on this instance', |
86 | type: ServerErrorCode.LIVE_NOT_ALLOWING_REPLAY | ||
85 | }) | 87 | }) |
86 | } | 88 | } |
87 | 89 | ||
@@ -116,8 +118,8 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([ | |||
116 | 118 | ||
117 | return res.fail({ | 119 | return res.fail({ |
118 | status: HttpStatusCode.FORBIDDEN_403, | 120 | status: HttpStatusCode.FORBIDDEN_403, |
119 | type: ServerErrorCode.MAX_USER_LIVES_LIMIT_REACHED, | 121 | message: 'Cannot create this live because the max user lives limit is reached.', |
120 | message: 'Cannot create this live because the max user lives limit is reached.' | 122 | type: ServerErrorCode.MAX_USER_LIVES_LIMIT_REACHED |
121 | }) | 123 | }) |
122 | } | 124 | } |
123 | } | 125 | } |