feat: change all occurrences of server with guild
This commit is contained in:
parent
57f31d487e
commit
fe1474416f
5 changed files with 10 additions and 10 deletions
|
@ -20,7 +20,7 @@ const route = useRoute();
|
|||
|
||||
async function generateInvite(): Promise<void> {
|
||||
const createdInvite: InviteResponse | undefined = await fetchWithApi(
|
||||
`/servers/${route.params.serverId}/invites`,
|
||||
`/guilds/${route.params.guildId}/invites`,
|
||||
{ method: "POST", body: { custom_id: "oijewfoiewf" } }
|
||||
);
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<NuxtLink id="home-button" href="/">
|
||||
<Icon name="lucide:house" class="white" size="2rem" />
|
||||
</NuxtLink>
|
||||
<div id="servers-list">
|
||||
<NuxtLink v-for="server of servers" :href="`/servers/${server.uuid}`">
|
||||
<div id="guilds-list">
|
||||
<NuxtLink v-for="guild of guilds" :href="`/guilds/${guild.uuid}`">
|
||||
<Icon name="lucide:server" class="white" size="2rem" />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@ import type { GuildResponse } from '~/types/interfaces';
|
|||
|
||||
const loading = useState("loading", () => false);
|
||||
|
||||
const servers: GuildResponse[] | undefined = await fetchWithApi("/me/guilds");
|
||||
const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds");
|
||||
|
||||
//const servers = await fetchWithApi("/servers") as { uuid: string, name: string, description: string }[];
|
||||
//console.log("servers:", servers);
|
||||
|
@ -169,7 +169,7 @@ const members = [
|
|||
padding-bottom: 1dvh;
|
||||
}
|
||||
|
||||
#servers-list {
|
||||
#guilds-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1dvh;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const server = await fetchWithApi(`/guilds/${useRoute().params.serverId}`);
|
||||
console.log("server:", server);
|
||||
const guild = await fetchWithApi(`/guilds/${useRoute().params.guildId}`);
|
||||
console.log("guild:", guild);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { UserResponse } from "~/types/interfaces"
|
||||
|
||||
export default async (serverId: string, memberId: string): Promise<UserResponse> => {
|
||||
const user = await fetchWithApi(`/guilds/${serverId}/members/${memberId}`) as UserResponse;
|
||||
export default async (guildId: string, memberId: string): Promise<UserResponse> => {
|
||||
const user = await fetchWithApi(`/guilds/${guildId}/members/${memberId}`) as UserResponse;
|
||||
return user;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { UserResponse } from "~/types/interfaces"
|
||||
|
||||
export default async (serverId: string, userId: string): Promise<UserResponse> => {
|
||||
export default async (guildId: string, userId: string): Promise<UserResponse> => {
|
||||
const user = await fetchWithApi(`/users/${userId}`) as UserResponse;
|
||||
return user;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue