mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
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
This commit is contained in:
parent
c907c2fa3f
commit
bee0abffff
32 changed files with 273 additions and 45 deletions
|
@ -15,6 +15,10 @@ function isUserVideoQuotaValid (value: string) {
|
|||
return exists(value) && validator.isInt(value + '', USERS_CONSTRAINTS_FIELDS.VIDEO_QUOTA)
|
||||
}
|
||||
|
||||
function isUserVideoQuotaDailyValid (value: string) {
|
||||
return exists(value) && validator.isInt(value + '', USERS_CONSTRAINTS_FIELDS.VIDEO_QUOTA_DAILY)
|
||||
}
|
||||
|
||||
function isUserUsernameValid (value: string) {
|
||||
const max = USERS_CONSTRAINTS_FIELDS.USERNAME.max
|
||||
const min = USERS_CONSTRAINTS_FIELDS.USERNAME.min
|
||||
|
@ -66,6 +70,7 @@ export {
|
|||
isUserBlockedReasonValid,
|
||||
isUserRoleValid,
|
||||
isUserVideoQuotaValid,
|
||||
isUserVideoQuotaDailyValid,
|
||||
isUserUsernameValid,
|
||||
isUserNSFWPolicyValid,
|
||||
isUserAutoPlayVideoValid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue