Perf webhook (#3406)

* perf: plugin webhook

* perf: plugin webhook
This commit is contained in:
Archer
2024-12-16 16:44:39 +08:00
committed by GitHub
parent 8e9c030600
commit 8ba339e78f
16 changed files with 439 additions and 211 deletions

View File

@@ -48,6 +48,13 @@ async function handler(req: ApiRequestProps<{}, ClearHistoriesProps>, res: NextA
source: ChatSourceEnum.online
};
}
if (authType === 'apikey') {
return {
teamId: chatTeamId,
appId,
source: ChatSourceEnum.api
};
}
return Promise.reject('Param are error');
})();

View File

@@ -73,7 +73,7 @@ const WorkflowStatusContextProvider = ({ children }: { children: ReactNode }) =>
if (isSaved || !leaveSaveSign.current) return;
console.log('Leave auto save');
const data = flowData2StoreData();
if (!data) return;
if (!data || data.nodes.length === 0) return;
await onSaveApp({
...data,
isPublish: false,