From 13db2b6b0139c9b52b420211cc4a6f1ba6d5574a Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 16:41:37 +0000 Subject: [PATCH] Run SQL to add remote_jid column The SQL commands to add the `remote_jid` column to the `usuarios` table have been approved and should be executed. --- src/components/auth/RegisterForm.tsx | 1 + src/integrations/supabase/types.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/components/auth/RegisterForm.tsx b/src/components/auth/RegisterForm.tsx index 73b151d..eccce2a 100644 --- a/src/components/auth/RegisterForm.tsx +++ b/src/components/auth/RegisterForm.tsx @@ -76,6 +76,7 @@ const RegisterForm = ({ isLoading, setIsLoading }: RegisterFormProps) => { // Removemos formatação antes de enviar para o banco const whatsappLimpo = whatsapp.replace(/\D/g, ''); + // Garantir que todos os parâmetros sejam incluídos na chamada para a função registrar_usuario const { data, error } = await supabase.rpc('registrar_usuario', { nome, empresa, diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index 704fd77..911b9b5 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -294,6 +294,7 @@ export type Database = { empresa: string | null id: string nome: string + remote_jid: string | null senha: string whatsapp: string } @@ -303,6 +304,7 @@ export type Database = { empresa?: string | null id?: string nome: string + remote_jid?: string | null senha: string whatsapp: string } @@ -312,6 +314,7 @@ export type Database = { empresa?: string | null id?: string nome?: string + remote_jid?: string | null senha?: string whatsapp?: string }