mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Removed output of "page" attributes from APIs
refs https://github.com/TryGhost/Toolbox/issues/332 refs https://github.com/TryGhost/Ghost/issues/10922 - The "page" attirbute has been deprecated long time ago and was kept around in the output for back compatibility reasons. With Ghost 5.0 there's no longer need to return this field or keep around any of the code supporting "page" attribute processing
This commit is contained in:
parent
27337e5f00
commit
f5f1221e14
2 changed files with 2 additions and 12 deletions
|
@ -55,10 +55,6 @@ module.exports = async (model, frame, options = {}) => {
|
|||
}
|
||||
|
||||
if (utils.isContentAPI(frame)) {
|
||||
// Content api v2 still expects page prop
|
||||
if (jsonModel.type === 'page') {
|
||||
jsonModel.page = true;
|
||||
}
|
||||
date.forPost(jsonModel);
|
||||
gating.forPost(jsonModel, frame);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ Hopefully you don't find it a bore.",
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 0,
|
||||
"slug": "static-page-test",
|
||||
|
@ -48,7 +47,7 @@ exports[`Pages Content API Can request page 2: [headers] 1`] = `
|
|||
Object {
|
||||
"access-control-allow-origin": "*",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-length": "1078",
|
||||
"content-length": "1066",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
"vary": "Accept-Encoding",
|
||||
|
@ -95,7 +94,6 @@ An about page is a great example of one you might want to set up early on so peo
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 0,
|
||||
"slug": "about",
|
||||
|
@ -139,7 +137,6 @@ If you prefer to use a contact form, almost all of the great embedded form servi
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 1,
|
||||
"slug": "contact",
|
||||
|
@ -179,7 +176,6 @@ Ghost is a non-profit organization, and we give away all our intellectual proper
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 0,
|
||||
"slug": "contribute",
|
||||
|
@ -216,7 +212,6 @@ You can integrate any products, services, ads or integrations with Ghost yoursel
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 0,
|
||||
"slug": "privacy",
|
||||
|
@ -253,7 +248,6 @@ Hopefully you don't find it a bore.",
|
|||
"og_description": null,
|
||||
"og_image": null,
|
||||
"og_title": null,
|
||||
"page": true,
|
||||
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
|
||||
"reading_time": 0,
|
||||
"slug": "static-page-test",
|
||||
|
@ -274,7 +268,7 @@ exports[`Pages Content API Can request pages 2: [headers] 1`] = `
|
|||
Object {
|
||||
"access-control-allow-origin": "*",
|
||||
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
||||
"content-length": "9124",
|
||||
"content-length": "9064",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
||||
"vary": "Accept-Encoding",
|
||||
|
|
Loading…
Add table
Reference in a new issue