add and run prettier
This commit is contained in:
@ -97,12 +97,12 @@ export async function fetchUrl(url, options = {}, cors = true) {
|
||||
|
||||
export async function fetchJson(
|
||||
url,
|
||||
{ cacheTtl = null, maxAge = null, ...restOptions } = {}
|
||||
{ cacheTtl = null, maxAge = null, ...restOptions } = {},
|
||||
) {
|
||||
const options = getOptionsWithCacheKey(
|
||||
url,
|
||||
{ cacheTtl, maxAge, ...restOptions },
|
||||
"json"
|
||||
"json",
|
||||
);
|
||||
|
||||
const {
|
||||
@ -129,7 +129,7 @@ export async function fetchJson(
|
||||
body,
|
||||
},
|
||||
fetchCacheKey,
|
||||
fetchCacheTtl
|
||||
fetchCacheTtl,
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -141,12 +141,12 @@ export async function fetchJson(
|
||||
|
||||
export async function fetchHtml(
|
||||
url,
|
||||
{ cacheTtl = null, maxAge = null, ...restOptions } = {}
|
||||
{ cacheTtl = null, maxAge = null, ...restOptions } = {},
|
||||
) {
|
||||
const options = getOptionsWithCacheKey(
|
||||
url,
|
||||
{ cacheTtl, maxAge, ...restOptions },
|
||||
"json"
|
||||
"json",
|
||||
);
|
||||
|
||||
const {
|
||||
@ -172,7 +172,7 @@ export async function fetchHtml(
|
||||
body: new DOMParser().parseFromString(body, "text/html"),
|
||||
},
|
||||
fetchCacheKey,
|
||||
fetchCacheTtl
|
||||
fetchCacheTtl,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user