Initial commit

This commit is contained in:
jude
2023-10-28 14:50:37 +01:00
commit 8d384c9e50
91 changed files with 73289 additions and 0 deletions

20
src/api.ts Normal file
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[]>;
}