mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed and extended debug logs in entry-lookup helper
no issue
This commit is contained in:
parent
5e9710cf60
commit
ec29cfa1da
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
const _ = require('lodash'),
|
const _ = require('lodash'),
|
||||||
Promise = require('bluebird'),
|
Promise = require('bluebird'),
|
||||||
url = require('url'),
|
url = require('url'),
|
||||||
debug = require('ghost-ignition').debug('services:routing:helpers:post-lookup'),
|
debug = require('ghost-ignition').debug('services:routing:helpers:entry-lookup'),
|
||||||
routeMatch = require('path-match')();
|
routeMatch = require('path-match')();
|
||||||
|
|
||||||
function entryLookup(postUrl, routerOptions, locals) {
|
function entryLookup(postUrl, routerOptions, locals) {
|
||||||
|
@ -17,7 +17,9 @@ function entryLookup(postUrl, routerOptions, locals) {
|
||||||
const matchFunc = routeMatch(permalinks);
|
const matchFunc = routeMatch(permalinks);
|
||||||
const params = matchFunc(targetPath);
|
const params = matchFunc(targetPath);
|
||||||
|
|
||||||
|
debug(targetPath);
|
||||||
debug(params);
|
debug(params);
|
||||||
|
debug(permalinks);
|
||||||
|
|
||||||
// CASE 1: no matches, resolve
|
// CASE 1: no matches, resolve
|
||||||
// CASE 2: params can be empty e.g. permalink is /featured/:options(edit)?/ and path is /featured/
|
// CASE 2: params can be empty e.g. permalink is /featured/:options(edit)?/ and path is /featured/
|
||||||
|
|
Loading…
Add table
Reference in a new issue