diff --git a/apps/web/src/routes/(dashboard)/abrir-chamado/+page.svelte b/apps/web/src/routes/(dashboard)/abrir-chamado/+page.svelte index c445f2e..7180ddd 100644 --- a/apps/web/src/routes/(dashboard)/abrir-chamado/+page.svelte +++ b/apps/web/src/routes/(dashboard)/abrir-chamado/+page.svelte @@ -7,6 +7,7 @@ import TicketTimeline from "$lib/components/chamados/TicketTimeline.svelte"; import { chamadosStore } from "$lib/stores/chamados"; import { resolve } from "$app/paths"; + import { useConvexWithAuth } from "$lib/hooks/useConvexWithAuth"; type Ticket = Doc<"tickets">; type SlaConfig = Doc<"slaConfigs">; @@ -45,6 +46,11 @@ carregarSlaConfigs(); }); + $effect(() => { + // Garante que o cliente Convex use o token do usuário logado + useConvexWithAuth(); + }); + async function carregarSlaConfigs() { try { carregandoSla = true; diff --git a/apps/web/src/routes/(dashboard)/perfil/+page.svelte b/apps/web/src/routes/(dashboard)/perfil/+page.svelte index fa7e589..d23443b 100644 --- a/apps/web/src/routes/(dashboard)/perfil/+page.svelte +++ b/apps/web/src/routes/(dashboard)/perfil/+page.svelte @@ -1,6 +1,7 @@