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