diff --git a/src/modules/activities/views/EventsPage.vue b/src/modules/activities/views/EventsPage.vue index 2a4adac..a8eefdd 100644 --- a/src/modules/activities/views/EventsPage.vue +++ b/src/modules/activities/views/EventsPage.vue @@ -48,11 +48,13 @@ function canEdit(event: TicketedEvent): boolean { onMounted(async () => { if (!isAuthenticated.value) return - const adminKey = currentUser.value?.wallets?.[0]?.adminkey - if (!adminKey) return + const wallet = currentUser.value?.wallets?.[0] + if (!wallet?.inkey) return const ticketApi = injectService(SERVICE_TOKENS.TICKET_API) as TicketApiService - isAdmin.value = await ticketApi.isAdmin(adminKey) - autoApprove.value = await ticketApi.getAutoApprove(adminKey) + autoApprove.value = await ticketApi.getAutoApprove(wallet.inkey) + if (wallet.adminkey) { + isAdmin.value = await ticketApi.isAdmin(wallet.adminkey) + } }) function formatDate(dateStr: string | null | undefined) { @@ -159,7 +161,16 @@ function handleEventChanged() {