Skip to content

Commit

Permalink
Remove unnecessary key
Browse files Browse the repository at this point in the history
  • Loading branch information
netervati committed Nov 22, 2023
1 parent 672eeb6 commit 0c2f8ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/modal/createModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@
};
const onSubmit = form.handleSubmit(async (values) => {
const data = values.schema.map((sch) => ({
name: sch.name,
type: sch.type,
}));
await model.create(
{
name: values.name,
schema: values.schema,
schema: data,
},
{
onSuccess: () => {
Expand Down
7 changes: 6 additions & 1 deletion components/modal/editModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@
};
const onSubmit = form.handleSubmit(async (values) => {
const data = values.schema.map((sch) => ({
name: sch.name,
type: sch.type,
}));
await model.update(
{
name: values.name,
schema: values.schema,
schema: data,
},
{
onSuccess: (updated) => {
Expand Down

1 comment on commit 0c2f8ec

@vercel
Copy link

@vercel vercel bot commented on 0c2f8ec Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.