aboutsummaryrefslogtreecommitdiff
path: root/src/routes/api/birthdays/secondary/+server.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-01 16:20:51 -0800
committerFuwn <[email protected]>2026-03-01 16:21:02 -0800
commiteae5d24d9e79e59a19d4721caaeaa0ca650ecb33 (patch)
tree1b685bb248e051dfa26d2bfdebe6689402dd93c5 /src/routes/api/birthdays/secondary/+server.ts
parentchore(tooling): remove legacy eslint and prettier (diff)
downloaddue.moe-eae5d24d9e79e59a19d4721caaeaa0ca650ecb33.tar.xz
due.moe-eae5d24d9e79e59a19d4721caaeaa0ca650ecb33.zip
chore(biome): drop formatter style overrides
Diffstat (limited to 'src/routes/api/birthdays/secondary/+server.ts')
-rw-r--r--src/routes/api/birthdays/secondary/+server.ts51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/routes/api/birthdays/secondary/+server.ts b/src/routes/api/birthdays/secondary/+server.ts
index 5036622f..b471a32b 100644
--- a/src/routes/api/birthdays/secondary/+server.ts
+++ b/src/routes/api/birthdays/secondary/+server.ts
@@ -1,28 +1,29 @@
-import { env } from '$env/dynamic/private';
+import { env } from "$env/dynamic/private";
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, s-maxage=10',
- Cookie: `USTATS=${env.ACDB_COOKIE}`
- }
- }
- )
- ).json(),
- {
- headers: {
- 'Cache-Control': 'max-age=10800, s-maxage=10800',
- 'Access-Control-Allow-Origin': 'https://due.moe'
- }
- }
- );
+ 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, s-maxage=10",
+ Cookie: `USTATS=${env.ACDB_COOKIE}`,
+ },
+ },
+ )
+ ).json(),
+ {
+ headers: {
+ "Cache-Control": "max-age=10800, s-maxage=10800",
+ "Access-Control-Allow-Origin": "https://due.moe",
+ },
+ },
+ );
};