mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed reading_time calculation for non public posts
no issue - The calculation of reading time has to happen before html field is sanitized for members plan.
This commit is contained in:
parent
95543b0461
commit
5760395e92
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,8 @@ const mapPost = (model, frame) => {
|
||||||
|
|
||||||
url.forPost(model.id, jsonModel, frame);
|
url.forPost(model.id, jsonModel, frame);
|
||||||
|
|
||||||
|
extraAttrs.forPost(frame, model, jsonModel);
|
||||||
|
|
||||||
if (utils.isContentAPI(frame)) {
|
if (utils.isContentAPI(frame)) {
|
||||||
// Content api v2 still expects page prop
|
// Content api v2 still expects page prop
|
||||||
if (jsonModel.type === 'page') {
|
if (jsonModel.type === 'page') {
|
||||||
|
@ -44,7 +46,6 @@ const mapPost = (model, frame) => {
|
||||||
members.forPost(jsonModel, frame);
|
members.forPost(jsonModel, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
extraAttrs.forPost(frame, model, jsonModel);
|
|
||||||
clean.post(jsonModel, frame);
|
clean.post(jsonModel, frame);
|
||||||
|
|
||||||
if (frame.options && frame.options.withRelated) {
|
if (frame.options && frame.options.withRelated) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue