diff options
| author | Fuwn <[email protected]> | 2023-12-02 13:19:59 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-02 13:19:59 -0800 |
| commit | 3c62c804a12f0c5d38fdb86923739fd649f6b289 (patch) | |
| tree | 46e9ff48fd47ea9e827fdccf9ee596140b8c8b9e /src/routes/api/acdb-birthdays/+server.ts | |
| parent | feat(wrapped): better options format (diff) | |
| download | due.moe-3c62c804a12f0c5d38fdb86923739fd649f6b289.tar.xz due.moe-3c62c804a12f0c5d38fdb86923739fd649f6b289.zip | |
feat(tools): re-add character birthdays
Diffstat (limited to 'src/routes/api/acdb-birthdays/+server.ts')
| -rw-r--r-- | src/routes/api/acdb-birthdays/+server.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/routes/api/acdb-birthdays/+server.ts b/src/routes/api/acdb-birthdays/+server.ts new file mode 100644 index 00000000..fe13ff7c --- /dev/null +++ b/src/routes/api/acdb-birthdays/+server.ts @@ -0,0 +1,19 @@ +export const GET = async ({ url }: { url: URL }) => { + return Response.json( + await ( + await fetch( + `https://www.animecharactersdatabase.com/api_series_characters.php?month=${url.searchParams.get( + 'month' + )}&day=${url.searchParams.get('day')}`, + { + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0', + 'Cache-Control': 'max-age=10' + } + } + ) + ).json() + ); +}; |