Also export template hash
This commit is contained in:
parent
798d010776
commit
c91d78fe51
@ -4,7 +4,7 @@
|
|||||||
* @param {String} token might match the following pattern: {user}@{tpl_id}@{token}:{cache_buster}
|
* @param {String} token might match the following pattern: {user}@{tpl_id}@{token}:{cache_buster}
|
||||||
*/
|
*/
|
||||||
function parse (token) {
|
function parse (token) {
|
||||||
var signer, cacheBuster;
|
var signer, cacheBuster, templateHash;
|
||||||
|
|
||||||
var tokenSplit = token.split(':');
|
var tokenSplit = token.split(':');
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ function parse (token) {
|
|||||||
if (tokenSplit.length > 1) {
|
if (tokenSplit.length > 1) {
|
||||||
signer = tokenSplit.shift();
|
signer = tokenSplit.shift();
|
||||||
if (tokenSplit.length > 1) {
|
if (tokenSplit.length > 1) {
|
||||||
/* var template_hash = */tokenSplit.shift(); // unused
|
templateHash = tokenSplit.shift();
|
||||||
}
|
}
|
||||||
token = tokenSplit.shift();
|
token = tokenSplit.shift();
|
||||||
}
|
}
|
||||||
@ -25,7 +25,9 @@ function parse (token) {
|
|||||||
return {
|
return {
|
||||||
token: token,
|
token: token,
|
||||||
signer: signer,
|
signer: signer,
|
||||||
cacheBuster: cacheBuster
|
cacheBuster: cacheBuster,
|
||||||
|
templateHash: templateHash
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.parse = parse;
|
module.exports.parse = parse;
|
||||||
|
Loading…
Reference in New Issue
Block a user