]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Increase video comments limit
authorChocobozzz <me@florianbigard.com>
Tue, 5 May 2020 14:48:30 +0000 (16:48 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 5 May 2020 14:48:30 +0000 (16:48 +0200)
server/initializers/constants.ts
server/tests/api/check-params/video-comments.ts

index d583912fb7c247a329a2a56debcc5e0fb3d96d8e..298322e3d3e8854169235dd1de7bc6cf538845f5 100644 (file)
@@ -283,7 +283,7 @@ const CONSTRAINTS_FIELDS = {
     COUNT: { min: 0 }
   },
   VIDEO_COMMENTS: {
-    TEXT: { min: 1, max: 3000 }, // Length
+    TEXT: { min: 1, max: 10000 }, // Length
     URL: { min: 3, max: 2000 } // Length
   },
   VIDEO_SHARE: {
index e67cc01fa42c4b0cd926b9046153e967a6920530..38f0695039d323c5935051f284ae339204311395 100644 (file)
@@ -133,7 +133,7 @@ describe('Test video comments API validator', function () {
 
     it('Should fail with a long comment', async function () {
       const fields = {
-        text: 'h'.repeat(3001)
+        text: 'h'.repeat(10001)
       }
       await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields })
     })
@@ -176,7 +176,7 @@ describe('Test video comments API validator', function () {
 
     it('Should fail with a long comment', async function () {
       const fields = {
-        text: 'h'.repeat(3001)
+        text: 'h'.repeat(10001)
       }
       await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields })
     })