🐛 Fixed {{url}} output when using {{#next_post}}/{{#prev_post}}

closes #10546

- TODO: raise issue
This commit is contained in:
kirrg001 2019-02-27 14:51:54 +01:00
parent 2732e467db
commit f33dacaf64
2 changed files with 5 additions and 1 deletions

View File

@ -163,6 +163,7 @@ get = function get(resource, options) {
// Parse the options we're going to pass to the API
apiOptions = parseOptions(ghostGlobals, this, apiOptions);
// @TODO: get helper should make an HTTP request to the Content API {version}
return api[apiVersion][controller][action](apiOptions).then(function success(result) {
var blockParams;

View File

@ -53,7 +53,10 @@ fetch = function fetch(options, data) {
const apiOptions = buildApiOptions(options, this);
const apiVersion = data.root._locals.apiVersion;
return api[apiVersion].posts
// @TODO: prev_next helper should make an HTTP request to the Content API {version}
const controller = api[apiVersion].postsPublic || api[apiVersion].posts;
return controller
.browse(apiOptions)
.then(function handleSuccess(result) {
var related = result.posts[0];