guild-settings #35

Merged
sauceyred merged 42 commits from guild-settings into main 2025-07-13 02:26:37 +00:00
Showing only changes of commit a1e21244aa - Show all commits

View file

@ -45,6 +45,10 @@ export const useApi = () => {
return await fetchWithApi(`/guilds`, { method: "POST", body: { name } }); return await fetchWithApi(`/guilds`, { method: "POST", body: { name } });
} }
async function joinGuild(invite: string): Promise<GuildResponse> {
return await fetchWithApi(`/invites/${invite}`, { method: "POST" }) as GuildResponse;
}
return { return {
fetchGuilds, fetchGuilds,
fetchGuild, fetchGuild,
@ -57,5 +61,6 @@ export const useApi = () => {
fetchMessages, fetchMessages,
fetchMessage, fetchMessage,
createGuild, createGuild,
joinGuild,
} }
} }