diff options
author | Felix Ableitner <me@nutomic.com> | 2018-08-28 02:01:35 -0500 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-28 09:01:35 +0200 |
commit | bee0abffff73804d816b90c7fd599e0a51c09d61 (patch) | |
tree | fae6d58637f9c63a3800090277f8e130b43442dd /server/initializers/constants.ts | |
parent | c907c2fa3fd7c0a741117a0204d0ebca675124bd (diff) | |
download | PeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.tar.gz PeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.tar.zst PeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.zip |
Implement daily upload limit (#956)
* Implement daily upload limit (ref #652)
* remove duplicate code
* review fixes
* fix tests?
* whitespace fixes, finish leftover todo
* fix tests
* added some new tests
* use different config value for tests
* remove todo
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index a0dd78f42..4111d04ec 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -202,7 +202,8 @@ const CONFIG = { | |||
202 | } | 202 | } |
203 | }, | 203 | }, |
204 | USER: { | 204 | USER: { |
205 | get VIDEO_QUOTA () { return config.get<number>('user.video_quota') } | 205 | get VIDEO_QUOTA () { return config.get<number>('user.video_quota') }, |
206 | get VIDEO_QUOTA_DAILY () { return config.get<number>('user.video_quota_daily') } | ||
206 | }, | 207 | }, |
207 | TRANSCODING: { | 208 | TRANSCODING: { |
208 | get ENABLED () { return config.get<boolean>('transcoding.enabled') }, | 209 | get ENABLED () { return config.get<boolean>('transcoding.enabled') }, |
@@ -263,6 +264,7 @@ const CONSTRAINTS_FIELDS = { | |||
263 | USERNAME: { min: 3, max: 20 }, // Length | 264 | USERNAME: { min: 3, max: 20 }, // Length |
264 | PASSWORD: { min: 6, max: 255 }, // Length | 265 | PASSWORD: { min: 6, max: 255 }, // Length |
265 | VIDEO_QUOTA: { min: -1 }, | 266 | VIDEO_QUOTA: { min: -1 }, |
267 | VIDEO_QUOTA_DAILY: { min: -1 }, | ||
266 | BLOCKED_REASON: { min: 3, max: 250 } // Length | 268 | BLOCKED_REASON: { min: 3, max: 250 } // Length |
267 | }, | 269 | }, |
268 | VIDEO_ABUSES: { | 270 | VIDEO_ABUSES: { |