aboutsummaryrefslogtreecommitdiff
path: root/src/routes/api/mangadex/feed
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-13 01:47:57 -0700
committerFuwn <[email protected]>2023-09-13 01:47:57 -0700
commit54ecc99c7ea310ce9dc269dfdc5db831bd76aa00 (patch)
treef94b7616cd77f5d53189775143c13ce0930b2baa /src/routes/api/mangadex/feed
parentrefactor(anilist): move to api (diff)
downloaddue.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.ts11
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()
+ );
+};