Corrigiu URL OAuth no client

X-Lovable-Edit-ID: edt-e22d70d2-1774-4933-9ab7-7ffca16ae7c6
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot] 2026-05-25 17:21:05 +00:00
commit c955dd997b
2 changed files with 3 additions and 12 deletions

View file

@ -24,16 +24,16 @@ export function IntegrationCard({ state, agentReady }: Props) {
return; return;
} }
setConnecting(true); setConnecting(true);
const { data, error } = await invokeFunction<{ authorize_url: string }>( const { data, error } = await invokeFunction<{ auth_url: string }>(
"oauth-start", "oauth-start",
{ mcp_slug: mcp.slug }, { mcp_slug: mcp.slug },
); );
setConnecting(false); setConnecting(false);
if (error || !data?.authorize_url) { if (error || !data?.auth_url) {
toast.error(error?.message ?? "Não foi possível iniciar a conexão."); toast.error(error?.message ?? "Não foi possível iniciar a conexão.");
return; return;
} }
window.location.href = data.authorize_url; window.location.href = data.auth_url;
} }
return ( return (

View file

@ -670,12 +670,3 @@ const rootRouteChildren: RootRouteChildren = {
export const routeTree = rootRouteImport export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren) ._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>() ._addFileTypes<FileRouteTypes>()
import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
}
}