Initial commit

This commit is contained in:
claude Bot committed 2023-10-28 14:50:37 +01:00
commit 8d384c9e50
91 files changed
+73289

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import axios from "axios";
type UserInfo = {
name: string;
patreon: boolean;
timezone: string | null;
};
export type GuildInfo = {
id: string;
name: string;
};
export function fetchUserInfo(): Promise<UserInfo> {
return axios.get("/api/user").then((resp) => resp.data) as Promise<UserInfo>;
}
export function fetchUserGuilds(): Promise<GuildInfo[]> {
return axios.get("/api/user/guilds").then((resp) => resp.data) as Promise<GuildInfo[]>;
}