Skip to content

Commit

Permalink
Fix incorrect default values and server response in list creation UI
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Aug 22, 2020
1 parent 0f055ea commit 1ef1c5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func handleCreateList(c echo.Context) error {
// Hand over to the GET handler to return the last insertion.
c.SetParamNames("id")
c.SetParamValues(fmt.Sprintf("%d", newID))
return c.JSON(http.StatusOK, handleGetLists(c))
return handleGetLists(c)
}

// handleUpdateList handles list modification.
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/views/ListForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export default Vue.extend({
// Binds form input values.
form: {
name: '',
type: '',
optin: '',
tags: '',
type: 'private',
optin: 'single',
tags: [],
},
};
},
Expand Down Expand Up @@ -114,7 +114,7 @@ export default Vue.extend({
},
mounted() {
this.form = { ...this.$props.data };
this.form = { ...this.form, ...this.$props.data };
this.$nextTick(() => {
this.$refs.focus.focus();
Expand Down

0 comments on commit 1ef1c5a

Please sign in to comment.