diff --git a/components/InviteModal.vue b/components/InviteModal.vue index e43e660..15236da 100644 --- a/components/InviteModal.vue +++ b/components/InviteModal.vue @@ -20,8 +20,6 @@ const props = defineProps(); const invite = ref(); -const route = useRoute(); - async function generateInvite(): Promise { const chars = "ABCDEFGHIJKLMNOQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890" let randCode = ""; @@ -29,7 +27,7 @@ async function generateInvite(): Promise { randCode += chars[Math.floor(Math.random() * chars.length)]; } const createdInvite: InviteResponse | undefined = await fetchWithApi( - `/guilds/${route.params.serverId}/invites`, + `/guilds/${props.guildId}/invites`, { method: "POST", body: { custom_id: randCode } } );