camel case

This commit is contained in:
Daniel García Aubert
2019-11-14 12:17:26 +01:00
parent f9082dad94
commit d4719d5707
19 changed files with 139 additions and 139 deletions
@@ -467,17 +467,17 @@ function withLayergroup (layergroupConfig, options, callback) {
return `${signer ? `:${signer}@` : ''}`;
};
const cacheTpl = function ({ cache_buster, cacheBuster }) {
return `${cache_buster ? `:${cache_buster}` : `:${cacheBuster}`}`;
const cacheTpl = function ({ cacheBuster }) {
return `${cacheBuster ? `:${cacheBuster}` : ''}`;
};
const urlTpl = function ({ layergroupid, cache_buster = null, tile }) {
const { signer, token, cacheBuster } = LayergroupToken.parse(layergroupid);
const urlTpl = function ({ layergroupid, cacheBuster, tile }) {
const { signer, token, cacheBuster: cb } = LayergroupToken.parse(layergroupid);
const base = '/api/v1/map/';
return `${base}${signerTpl({ signer })}${token}${cacheTpl({ cache_buster, cacheBuster })}${tile}`;
return `${base}${signerTpl({ signer })}${token}${cacheTpl({ cacheBuster: (cacheBuster || cb) })}${tile}`;
};
const finalUrl = urlTpl({ layergroupid, cache_buster: options.cache_buster, tile: layergroupUrl });
const finalUrl = urlTpl({ layergroupid, cacheBuster: options.cache_buster, tile: layergroupUrl });
var request = {
url: finalUrl,