diff options
author | BRAINS YUM <43896676+McFlat@users.noreply.github.com> | 2018-10-19 01:54:01 -0500 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-19 08:54:01 +0200 |
commit | d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e (patch) | |
tree | e5a11500d446b585716d451dd274e8567d36cd2a /server/initializers/constants.ts | |
parent | e0628695c3425bf69b5d7a46b24dcdf31892d9b6 (diff) | |
download | PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.tar.gz PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.tar.zst PeerTube-d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e.zip |
Feature/description support fields length 1000 (#1267)
* fix migrations to not use config constant values as it can introduce bugs later when they change; (fixes #1259)
remove constant fields imports from migrations
* add migrations to update description and support fields to 1000 (fixes #1258)
* fix client/server account and video_channel description/support fields to be max len 1000 (fixes #1258);
fix test Should fail with a too long description;
fix test Should fail with a long description;
fix test Should fail with a long description;
Remove USER.SUPPORT from constants since that field no longer exists;
null not false, in migrations/0280-description-support.ts;
video support field 1000, oops;
* rename migration 0280-description-support.ts -> 0285-description-support.ts;
update video support maxlength text
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 03158e356..e8843a3ab 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -16,7 +16,7 @@ let config: IConfig = require('config') | |||
16 | 16 | ||
17 | // --------------------------------------------------------------------------- | 17 | // --------------------------------------------------------------------------- |
18 | 18 | ||
19 | const LAST_MIGRATION_VERSION = 280 | 19 | const LAST_MIGRATION_VERSION = 285 |
20 | 20 | ||
21 | // --------------------------------------------------------------------------- | 21 | // --------------------------------------------------------------------------- |
22 | 22 | ||
@@ -295,7 +295,7 @@ const CONFIG = { | |||
295 | const CONSTRAINTS_FIELDS = { | 295 | const CONSTRAINTS_FIELDS = { |
296 | USERS: { | 296 | USERS: { |
297 | NAME: { min: 3, max: 120 }, // Length | 297 | NAME: { min: 3, max: 120 }, // Length |
298 | DESCRIPTION: { min: 3, max: 250 }, // Length | 298 | DESCRIPTION: { min: 3, max: 1000 }, // Length |
299 | USERNAME: { min: 3, max: 20 }, // Length | 299 | USERNAME: { min: 3, max: 20 }, // Length |
300 | PASSWORD: { min: 6, max: 255 }, // Length | 300 | PASSWORD: { min: 6, max: 255 }, // Length |
301 | VIDEO_QUOTA: { min: -1 }, | 301 | VIDEO_QUOTA: { min: -1 }, |
@@ -311,8 +311,8 @@ const CONSTRAINTS_FIELDS = { | |||
311 | }, | 311 | }, |
312 | VIDEO_CHANNELS: { | 312 | VIDEO_CHANNELS: { |
313 | NAME: { min: 3, max: 120 }, // Length | 313 | NAME: { min: 3, max: 120 }, // Length |
314 | DESCRIPTION: { min: 3, max: 500 }, // Length | 314 | DESCRIPTION: { min: 3, max: 1000 }, // Length |
315 | SUPPORT: { min: 3, max: 500 }, // Length | 315 | SUPPORT: { min: 3, max: 1000 }, // Length |
316 | URL: { min: 3, max: 2000 } // Length | 316 | URL: { min: 3, max: 2000 } // Length |
317 | }, | 317 | }, |
318 | VIDEO_CAPTIONS: { | 318 | VIDEO_CAPTIONS: { |
@@ -341,7 +341,7 @@ const CONSTRAINTS_FIELDS = { | |||
341 | LANGUAGE: { min: 1, max: 10 }, // Length | 341 | LANGUAGE: { min: 1, max: 10 }, // Length |
342 | TRUNCATED_DESCRIPTION: { min: 3, max: 250 }, // Length | 342 | TRUNCATED_DESCRIPTION: { min: 3, max: 250 }, // Length |
343 | DESCRIPTION: { min: 3, max: 10000 }, // Length | 343 | DESCRIPTION: { min: 3, max: 10000 }, // Length |
344 | SUPPORT: { min: 3, max: 500 }, // Length | 344 | SUPPORT: { min: 3, max: 1000 }, // Length |
345 | IMAGE: { | 345 | IMAGE: { |
346 | EXTNAME: [ '.jpg', '.jpeg' ], | 346 | EXTNAME: [ '.jpg', '.jpeg' ], |
347 | FILE_SIZE: { | 347 | FILE_SIZE: { |