feat: add extensive test suite

This commit is contained in:
2026-08-30 11:33:53 +07:00 Unverified
parent 061cce00dc
commit 8359c7272e
131 changed files with 8717 additions and 2200 deletions
+5 -12
View File
@@ -1,14 +1,7 @@
import { getAmberVh } from "@/lib/api";
import { createAmberProxyHandler } from "@/lib/server-handlers";
export async function GET() {
return new Response(
await fetch(
`https://gi.yatta.moe/api/v2/en/avatar?vh=${await getAmberVh()}`,
).then((e) => e.text()),
{
headers: {
"Content-Type": "application/json",
},
},
);
}
export const GET = createAmberProxyHandler("en/avatar", {
getVersionHash: getAmberVh,
fetchText: (url) => fetch(url).then((response) => response.text()),
});