Fix url not returning json

This commit is contained in:
Sam Carlton 2022-05-21 11:58:11 -05:00
parent bd2fd082f0
commit e47efb6717

View file

@ -53,7 +53,7 @@ export function generateAPI ( {
return new Proxy(callable, {
get({ url }, propKey) {
// If we're just getting the url, return it
if ( propKey === 'url' ) return url
if ( propKey === 'url' ) return `${ url }.json`
// If we're using an HTTP method
// then do a request to the url