feat: replace ky with better-fetch for API requests

This commit is contained in:
2025-07-02 11:44:05 +02:00
parent 2034016ac7
commit 1b1914f684
4 changed files with 27 additions and 33 deletions

View File

@@ -1,11 +1,9 @@
import ky from "ky";
const API_ENDPOINT = "https://osu.direct/api/";
export const osudirect = {
osu: async (mapId: number): Promise<string | undefined> => {
try {
return await ky(API_ENDPOINT + `osu/${mapId}?raw`).text();
return await (await fetch(API_ENDPOINT + `osu/${mapId}?raw`)).text();
} catch {
return undefined;
}