fix requests not working

This commit is contained in:
Daniel Bulant 2022-09-21 20:33:15 +02:00 committed by GitHub
parent ec8230c1d2
commit d3c3283b4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
<script>
import request from "../util/request";
import request, { imageproxy } from "../util/request";
export var mangaId;
@ -14,7 +14,7 @@
Loading art
{:then list}
{#each list.data.sort((a, b) => a.attributes.volume - b.attributes.volume) as item}
<img on:click={() => selectedImage = `https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}>
<img on:click={() => selectedImage = `{imageproxy}https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}>
{/each}
{/await}
</div>

View file

@ -1,5 +1,5 @@
export const proxy = "https://cors-anywhere.danbulant.cloud/";
export const imageproxy = "https://cors-anywhere.danbulant.workers.dev/";
export const imageproxy = "https://cors-anywhere.danbulant.workers.dev/?";
export const base = proxy + "https://api.mangadex.org/";
function request(endpoint, query, type = "GET", body) {