0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed and extended debug logs in entry-lookup helper

no issue
This commit is contained in:
kirrg001 2019-01-04 20:45:23 +01:00
parent 5e9710cf60
commit ec29cfa1da

View file

@ -1,7 +1,7 @@
const _ = require('lodash'),
Promise = require('bluebird'),
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')();
function entryLookup(postUrl, routerOptions, locals) {
@ -17,7 +17,9 @@ function entryLookup(postUrl, routerOptions, locals) {
const matchFunc = routeMatch(permalinks);
const params = matchFunc(targetPath);
debug(targetPath);
debug(params);
debug(permalinks);
// CASE 1: no matches, resolve
// CASE 2: params can be empty e.g. permalink is /featured/:options(edit)?/ and path is /featured/