Use urlfor params
This commit is contained in:
parent
77f5e1d6fa
commit
7d2ab1a45e
@ -105,7 +105,8 @@ export default class API {
|
||||
return cache.then((cached) => {
|
||||
if (cached && cached.expires > Date.now()) { return cached.data; }
|
||||
|
||||
return this.request(`${this.repoURL}/contents/${key}.json?ref=refs/meta/_netlify_cms`, {
|
||||
return this.request(`${this.repoURL}/contents/${key}.json`, {
|
||||
params: { ref: 'refs/meta/_netlify_cms' },
|
||||
headers: { Accept: 'application/vnd.github.VERSION.raw' },
|
||||
cache: 'no-store',
|
||||
}).then((result) => {
|
||||
|
@ -99,7 +99,8 @@ export default class API {
|
||||
return cache.then((cached) => {
|
||||
if (cached && cached.expires > Date.now()) { return cached.data; }
|
||||
|
||||
return this.request(`${this.repoURL}/files/${key}.json?ref=refs/meta/_netlify_cms`, {
|
||||
return this.request(`${this.repoURL}/files/${key}.json`, {
|
||||
params: { ref: 'refs/meta/_netlify_cms' },
|
||||
headers: { Accept: 'application/vnd.github.VERSION.raw' },
|
||||
cache: 'no-store',
|
||||
}).then((result) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user