diff --git a/src/modules/modals/CreateRow.vue b/src/modules/modals/CreateRow.vue index 7ea545efe..7fa4ac831 100644 --- a/src/modules/modals/CreateRow.vue +++ b/src/modules/modals/CreateRow.vue @@ -120,12 +120,12 @@ export default { try { const data = {} for (const [key, value] of Object.entries(this.row)) { - data[key] = value; + data[key] = value } await this.$store.dispatch('insertNewRow', { viewId: this.isView ? this.elementId : null, tableId: !this.isView ? this.elementId : null, - data: data, + data, }) } catch (e) { console.error(e) diff --git a/src/store/data.js b/src/store/data.js index 354909a09..6229b079f 100644 --- a/src/store/data.js +++ b/src/store/data.js @@ -209,9 +209,9 @@ export default { let res = null try { - const collection = viewId == null ? "tables" : "views" + const collection = viewId == null ? 'tables' : 'views' const nodeId = viewId == null ? tableId : viewId - res = await axios.post(generateOcsUrl('/apps/tables/api/2/' + collection + '/' + nodeId + '/rows'), {data: data}) + res = await axios.post(generateOcsUrl('/apps/tables/api/2/' + collection + '/' + nodeId + '/rows'), { data }) } catch (e) { displayError(e, t('tables', 'Could not insert row.')) return false