aboutsummaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/api/acdb-birthdays/+server.ts19
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()
+ );
+};