diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/worker.ts | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/worker.ts b/src/worker.ts index d470b5f..124c67b 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -8,14 +8,15 @@ const shinobu = async (): Promise<Blob> => { // return cache["shinobu"].blob; // } - const url = ( - (await (await fetch(`https://api.waifu.pics/sfw/shinobu`)).json()) as { - url: string; - } - ).url; - - const response = await fetch(url); - const blob = await response.blob(); + const blob = await ( + await fetch( + ( + (await (await fetch(`https://api.waifu.pics/sfw/shinobu`)).json()) as { + url: string; + } + ).url + ) + ).blob(); // cache["shinobu"] = { // blob, |