diff options
| author | Fuwn <[email protected]> | 2023-09-13 01:47:57 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-13 01:47:57 -0700 |
| commit | 54ecc99c7ea310ce9dc269dfdc5db831bd76aa00 (patch) | |
| tree | f94b7616cd77f5d53189775143c13ce0930b2baa /src/routes/api/mangadex/feed | |
| parent | refactor(anilist): move to api (diff) | |
| download | due.moe-54ecc99c7ea310ce9dc269dfdc5db831bd76aa00.tar.xz due.moe-54ecc99c7ea310ce9dc269dfdc5db831bd76aa00.zip | |
refactor(mangadex): move to api
Diffstat (limited to 'src/routes/api/mangadex/feed')
| -rw-r--r-- | src/routes/api/mangadex/feed/+server.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/routes/api/mangadex/feed/+server.ts b/src/routes/api/mangadex/feed/+server.ts new file mode 100644 index 00000000..862ef5e4 --- /dev/null +++ b/src/routes/api/mangadex/feed/+server.ts @@ -0,0 +1,11 @@ +export const GET = async ({ url }) => { + return Response.json( + await ( + await fetch( + `https://api.mangadex.org/manga/${url.searchParams.get( + 'id' + )}/feed?order[chapter]=desc&translatedLanguage[]=en&limit=1&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic` + ) + ).json() + ); +}; |