mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
fix(composio): request Gmail read scope for triggers (#2191)
This commit is contained in:
@@ -165,6 +165,29 @@ export function handleIntegrations(ctx) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
method === "POST" &&
|
||||
/^\/agent-integrations\/composio\/authorize\/?$/.test(url)
|
||||
) {
|
||||
const toolkit =
|
||||
typeof parsedBody?.toolkit === "string" ? parsedBody.toolkit.trim() : "";
|
||||
if (!toolkit) {
|
||||
json(res, 400, {
|
||||
success: false,
|
||||
error: "Missing required field: toolkit",
|
||||
});
|
||||
return true;
|
||||
}
|
||||
json(res, 200, {
|
||||
success: true,
|
||||
data: {
|
||||
connectUrl: `https://composio.example/${toolkit}/consent`,
|
||||
connectionId: `conn-${toolkit}-pending`,
|
||||
},
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
method === "GET" &&
|
||||
/^\/agent-integrations\/composio\/triggers\/available(\?.*)?$/.test(url)
|
||||
|
||||
Reference in New Issue
Block a user