mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-25 13:54:59 -05:00
Merge pull request #6311 from JoelGritter/patch-1
fix(gh-5989): adjust comment load batch size
This commit is contained in:
commit
d737196b2b
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ const api = require('../lib/api');
|
||||||
const log = require('../lib/log');
|
const log = require('../lib/log');
|
||||||
|
|
||||||
const COMMENT_LIMIT = 20;
|
const COMMENT_LIMIT = 20;
|
||||||
|
const REPLY_LIMIT = 25;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
addNewComment,
|
addNewComment,
|
||||||
|
@ -44,7 +45,7 @@ const getReplies = (commentIds, offset) => ((dispatch, getState) => {
|
||||||
api({
|
api({
|
||||||
uri: `${isAdmin ? '/admin' : ''}/studios/${studioId}/comments/${parentId}/replies`,
|
uri: `${isAdmin ? '/admin' : ''}/studios/${studioId}/comments/${parentId}/replies`,
|
||||||
authentication: token ? token : null,
|
authentication: token ? token : null,
|
||||||
params: {offset: offset || 0, limit: COMMENT_LIMIT}
|
params: {offset: offset || 0, limit: REPLY_LIMIT}
|
||||||
}, (err, body, res) => {
|
}, (err, body, res) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(`Error fetching comment replies: ${err}`);
|
return callback(`Error fetching comment replies: ${err}`);
|
||||||
|
|
Loading…
Reference in a new issue