Add cachebuster to git-gateway API calls

This commit is contained in:
Benaiah Mischenko 2017-10-09 12:48:00 -07:00
parent 046711ab16
commit 0a5ec972db

View File

@ -25,7 +25,8 @@ export default class API extends GithubAPI {
urlFor(path, options) { urlFor(path, options) {
const params = []; const cacheBuster = new Date().getTime();
const params = [`ts=${ cacheBuster }`];
if (options.params) { if (options.params) {
for (const key in options.params) { for (const key in options.params) {
params.push(`${ key }=${ encodeURIComponent(options.params[key]) }`); params.push(`${ key }=${ encodeURIComponent(options.params[key]) }`);