fix: /guilds/me variable expecting wrong response object type

This commit is contained in:
SauceyRed 2025-05-31 16:32:51 +02:00
parent 9a84315b64
commit 3fd28ed3fc
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7
2 changed files with 11 additions and 4 deletions

View file

@ -11,7 +11,7 @@
<Icon name="lucide:house" class="white" size="2rem" />
</NuxtLink>
<div id="servers-list">
<NuxtLink v-for="guild of guilds" :href="`/servers/${guild.uuid}`">
<NuxtLink v-for="guild of guilds" :href="`/servers/${guild.guild_uuid}`">
<Icon name="lucide:server" class="white" size="2rem" />
</NuxtLink>
</div>
@ -21,12 +21,11 @@
</template>
<script lang="ts" setup>
import type { GuildResponse } from '~/types/interfaces';
import type { GuildMemberResponse } from '~/types/interfaces';
const loading = useState("loading", () => false);
const guilds: GuildResponse[] | undefined = await fetchWithApi("/me/guilds");
const guilds: GuildMemberResponse[] | undefined = await fetchWithApi("/me/guilds");
//const servers = await fetchWithApi("/servers") as { uuid: string, name: string, description: string }[];
//console.log("servers:", servers);