Browse Source

Updating formatting.

master
mike12345567 6 years ago
parent
commit
b0cea4c091
  1. 4
      packages/builder/src/components/userInterface/EventsEditor/actions/SaveRow.svelte
  2. 4
      packages/server/src/api/controllers/table.js
  3. 6
      packages/server/src/db/utils.js

4
packages/builder/src/components/userInterface/EventsEditor/actions/SaveRow.svelte

@ -88,8 +88,8 @@
<div class="root"> <div class="root">
{#if idFields.length === 0} {#if idFields.length === 0}
<div class="cannot-use"> <div class="cannot-use">
Update row can only be used within a component that provides data, such Update row can only be used within a component that provides data, such as
as a List a List
</div> </div>
{:else} {:else}
<Label size="m" color="dark">Datasource</Label> <Label size="m" color="dark">Datasource</Label>

4
packages/server/src/api/controllers/table.js

@ -116,9 +116,7 @@ exports.destroy = async function(ctx) {
include_docs: true, include_docs: true,
}) })
) )
await db.bulkDocs( await db.bulkDocs(rows.rows.map(row => ({ ...row.doc, _deleted: true })))
rows.rows.map(row => ({ ...row.doc, _deleted: true }))
)
// update linked rows // update linked rows
await linkRows.updateLinks({ await linkRows.updateLinks({

6
packages/server/src/db/utils.js

@ -63,11 +63,7 @@ exports.generateTableID = () => {
* @param {object} otherProps Any other properties to add to the request. * @param {object} otherProps Any other properties to add to the request.
* @returns {object} Parameters which can then be used with an allDocs request. * @returns {object} Parameters which can then be used with an allDocs request.
*/ */
exports.getRowParams = ( exports.getRowParams = (tableId = null, rowId = null, otherProps = {}) => {
tableId = null,
rowId = null,
otherProps = {}
) => {
if (tableId == null) { if (tableId == null) {
return getDocParams(DocumentTypes.ROW, null, otherProps) return getDocParams(DocumentTypes.ROW, null, otherProps)
} else { } else {

Loading…
Cancel
Save