diff options
| author | Fuwn <[email protected]> | 2023-10-17 17:39:35 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-10-17 17:39:35 -0700 |
| commit | c7c0ebca09b49cd73ffe34d255ff7a5a125f9013 (patch) | |
| tree | 6f209c9318ed52df5ef116311a1a6e808c84af7c | |
| parent | feat: initial release (diff) | |
| download | shinobu-c7c0ebca09b49cd73ffe34d255ff7a5a125f9013.tar.xz shinobu-c7c0ebca09b49cd73ffe34d255ff7a5a125f9013.zip | |
feat(worker): condense
| -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, |