feat: replace ky with better-fetch for API requests

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

No files matched your search

+1 -3
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;
}