mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 10:16:43 +00:00
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:
commit
c955dd997b
2 changed files with 3 additions and 12 deletions
|
|
@ -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 (
|
||||||
|
|
|
||||||
|
|
@ -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>>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue