mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-03 17:21:59 +08:00
Refa:migrate agent webhook routes to REST APIs (#14330)
### What problem does this PR solve? migrate agent webhook routes to REST APIs ### Type of change - [x] Refactoring
This commit is contained in:
@@ -3,6 +3,6 @@ import { useParams } from 'react-router';
|
||||
export function useBuildWebhookUrl() {
|
||||
const { id } = useParams();
|
||||
|
||||
const text = `${location.protocol}//${location.host}/api/v1/webhook/${id}`;
|
||||
const text = `${location.protocol}//${location.host}/api/v1/agents/${id}/webhook`;
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ enum WebhookTraceTabType {
|
||||
const WebhookSheet = ({ hideModal }: RunSheetProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { id } = useParams();
|
||||
const text = `${location.protocol}//${location.host}/api/v1/webhook_test/${id}`;
|
||||
const text = `${location.protocol}//${location.host}/api/v1/agents/${id}/webhook/test`;
|
||||
|
||||
const { data } = useFetchWebhookTrace(true);
|
||||
|
||||
|
||||
@@ -211,8 +211,8 @@ export default {
|
||||
prompt: `${restAPIv1}/agents/prompts`,
|
||||
cancelDataflow: (id: string) => `${webAPI}/canvas/cancel/${id}`,
|
||||
downloadFile: `${restAPIv1}/agents/download`,
|
||||
testWebhook: (id: string) => `${restAPIv1}/webhook_test/${id}`,
|
||||
fetchWebhookTrace: (id: string) => `${restAPIv1}/webhook_trace/${id}`,
|
||||
testWebhook: (id: string) => `${restAPIv1}/agents/${id}/webhook/test`,
|
||||
fetchWebhookTrace: (id: string) => `${restAPIv1}/agents/${id}/webhook/logs`,
|
||||
|
||||
// explore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user