Skip to content

Commit 0c2f8ec

Browse files
committed
Remove unnecessary key
1 parent 672eeb6 commit 0c2f8ec

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

components/modal/createModel.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@
4242
};
4343
4444
const onSubmit = form.handleSubmit(async (values) => {
45+
const data = values.schema.map((sch) => ({
46+
name: sch.name,
47+
type: sch.type,
48+
}));
49+
4550
await model.create(
4651
{
4752
name: values.name,
48-
schema: values.schema,
53+
schema: data,
4954
},
5055
{
5156
onSuccess: () => {

components/modal/editModel.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@
4949
};
5050
5151
const onSubmit = form.handleSubmit(async (values) => {
52+
const data = values.schema.map((sch) => ({
53+
name: sch.name,
54+
type: sch.type,
55+
}));
56+
5257
await model.update(
5358
{
5459
name: values.name,
55-
schema: values.schema,
60+
schema: data,
5661
},
5762
{
5863
onSuccess: (updated) => {

0 commit comments

Comments
 (0)