mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
fix: bug in submit
This commit is contained in:
@@ -194,16 +194,24 @@ export default function PipelineFormComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleModify(values: FormValues) {
|
function handleModify(values: FormValues) {
|
||||||
|
|
||||||
|
const realConfig = {
|
||||||
|
ai: values.ai,
|
||||||
|
trigger: values.trigger,
|
||||||
|
safety: values.safety,
|
||||||
|
output: values.output,
|
||||||
|
};
|
||||||
|
|
||||||
const pipeline: Pipeline = {
|
const pipeline: Pipeline = {
|
||||||
config: values,
|
config: realConfig,
|
||||||
created_at: '',
|
// created_at: '',
|
||||||
description: '',
|
description: values.basic.description,
|
||||||
for_version: '',
|
// for_version: '',
|
||||||
name: '',
|
name: values.basic.name,
|
||||||
stages: [],
|
// stages: [],
|
||||||
updated_at: '',
|
// updated_at: '',
|
||||||
uuid: pipelineId || '',
|
// uuid: pipelineId || '',
|
||||||
is_default: false,
|
// is_default: false,
|
||||||
};
|
};
|
||||||
httpClient.updatePipeline(pipelineId || '', pipeline).then(() => onFinish());
|
httpClient.updatePipeline(pipelineId || '', pipeline).then(() => onFinish());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,15 +64,15 @@ export interface ApiRespPipelines {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Pipeline {
|
export interface Pipeline {
|
||||||
uuid: string;
|
uuid?: string;
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
for_version: string;
|
for_version?: string;
|
||||||
config: object;
|
config: object;
|
||||||
stages: string[];
|
stages?: string[];
|
||||||
is_default: boolean;
|
is_default?: boolean;
|
||||||
created_at: string;
|
created_at?: string;
|
||||||
updated_at: string;
|
updated_at?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiRespPlatformAdapters {
|
export interface ApiRespPlatformAdapters {
|
||||||
|
|||||||
Reference in New Issue
Block a user