diff options
| author | Fuwn <[email protected]> | 2023-11-30 11:10:11 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-11-30 11:10:11 -0800 |
| commit | 74813bc7ce91277f68905be5ea8876784683f7ca (patch) | |
| tree | 9183e7932d9e350c4fbdfddfdf597f3ae2dfd9bd /src/routes/api/acdb-birthdays | |
| parent | feat(sequel_spy): add target blank (diff) | |
| download | due.moe-74813bc7ce91277f68905be5ea8876784683f7ca.tar.xz due.moe-74813bc7ce91277f68905be5ea8876784683f7ca.zip | |
fix(birthdays): current day
Diffstat (limited to 'src/routes/api/acdb-birthdays')
| -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() + ); +}; |