Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/242556
Change subject: api: bodyOnly -> body_only in query. ...................................................................... api: bodyOnly -> body_only in query. This follows the change in RESTBase on 2015-09-09: 1d9f5c45ec6cd02d0c6c25c6f7bed1fb5445c7c8 Change-Id: I96d5efd5bb08230eb35b1b2638f60b23cc225a45 --- M api/routes.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/56/242556/1 diff --git a/api/routes.js b/api/routes.js index 30a5606..03280c2 100644 --- a/api/routes.js +++ b/api/routes.js @@ -63,9 +63,14 @@ res.locals.pageName = req.params.title || ''; res.locals.oldid = req.params.revision || null; - // "bodyOnly" flag to return just the body (instead of the entire HTML doc) + // "body_only" flag to return just the body (instead of the entire HTML doc) if (version > 2) { - res.locals.bodyOnly = !!(req.query.bodyOnly || req.body.bodyOnly); + // RESTBase renamed this from 'bodyOnly' to 'body_only' in + // 1d9f5c45ec6, 2015-09-09. Support the old name for compatibility. + res.locals.bodyOnly = !!( + req.query.body_only || req.body.body_only || + req.query.bodyOnly || req.body.bodyOnly + ); } else { // in v2 this flag was named "body" res.locals.bodyOnly = !!(req.query.body || req.body.body); -- To view, visit https://gerrit.wikimedia.org/r/242556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96d5efd5bb08230eb35b1b2638f60b23cc225a45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits