aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-05 16:48:30 +0200
committerChocobozzz <me@florianbigard.com>2020-05-05 16:48:30 +0200
commit298b3fd31529c047e87d34d397af3b08833bd8d0 (patch)
tree505d5478da1acbdb1e99d4eca53fe16206bd2b8f
parent4c576aca1cb8652d88f6673f1d870b53654058d5 (diff)
downloadPeerTube-298b3fd31529c047e87d34d397af3b08833bd8d0.tar.gz
PeerTube-298b3fd31529c047e87d34d397af3b08833bd8d0.tar.zst
PeerTube-298b3fd31529c047e87d34d397af3b08833bd8d0.zip
Increase video comments limit
-rw-r--r--server/initializers/constants.ts2
-rw-r--r--server/tests/api/check-params/video-comments.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index d583912fb..298322e3d 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -283,7 +283,7 @@ const CONSTRAINTS_FIELDS = {
283 COUNT: { min: 0 } 283 COUNT: { min: 0 }
284 }, 284 },
285 VIDEO_COMMENTS: { 285 VIDEO_COMMENTS: {
286 TEXT: { min: 1, max: 3000 }, // Length 286 TEXT: { min: 1, max: 10000 }, // Length
287 URL: { min: 3, max: 2000 } // Length 287 URL: { min: 3, max: 2000 } // Length
288 }, 288 },
289 VIDEO_SHARE: { 289 VIDEO_SHARE: {
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts
index e67cc01fa..38f069503 100644
--- a/server/tests/api/check-params/video-comments.ts
+++ b/server/tests/api/check-params/video-comments.ts
@@ -133,7 +133,7 @@ describe('Test video comments API validator', function () {
133 133
134 it('Should fail with a long comment', async function () { 134 it('Should fail with a long comment', async function () {
135 const fields = { 135 const fields = {
136 text: 'h'.repeat(3001) 136 text: 'h'.repeat(10001)
137 } 137 }
138 await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields }) 138 await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields })
139 }) 139 })
@@ -176,7 +176,7 @@ describe('Test video comments API validator', function () {
176 176
177 it('Should fail with a long comment', async function () { 177 it('Should fail with a long comment', async function () {
178 const fields = { 178 const fields = {
179 text: 'h'.repeat(3001) 179 text: 'h'.repeat(10001)
180 } 180 }
181 await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields }) 181 await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields })
182 }) 182 })