From a2a28f9dbfb3ce876cfc5e32407b34df44ed6bfa Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Sun, 13 Jul 2025 00:42:07 +0200 Subject: [PATCH] fix: not being able to get guild ID from route due to it being in a component --- components/InviteModal.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 } } );