feat: replace ky with better-fetch for API requests
This commit is contained in:
1 parent
2034016ac7
commit
1b1914f684
4 files changed
+27
-33
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user