diff --git a/lib/models/layergroup-token.js b/lib/models/layergroup-token.js index 1e4a6951..5332ce0d 100644 --- a/lib/models/layergroup-token.js +++ b/lib/models/layergroup-token.js @@ -4,7 +4,7 @@ * @param {String} token might match the following pattern: {user}@{tpl_id}@{token}:{cache_buster} */ function parse (token) { - var signer, cacheBuster; + var signer, cacheBuster, templateHash; var tokenSplit = token.split(':'); @@ -17,7 +17,7 @@ function parse (token) { if (tokenSplit.length > 1) { signer = tokenSplit.shift(); if (tokenSplit.length > 1) { - /* var template_hash = */tokenSplit.shift(); // unused + templateHash = tokenSplit.shift(); } token = tokenSplit.shift(); } @@ -25,7 +25,9 @@ function parse (token) { return { token: token, signer: signer, - cacheBuster: cacheBuster + cacheBuster: cacheBuster, + templateHash: templateHash }; } + module.exports.parse = parse;