1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

fix lint erorrs

This commit is contained in:
kevmodrome 2020-05-27 13:51:19 +02:00
parent aa128509c1
commit aeb7c5dfc9
4 changed files with 19 additions and 22 deletions

View file

@ -61,7 +61,7 @@ exports.create = async function(ctx) {
}
}
exports.update = async function(ctx) {}
exports.update = async function() {}
exports.destroy = async function(ctx) {
const database = new CouchDB(ctx.params.instanceId)

View file

@ -2,8 +2,6 @@ const CouchDB = require("../../db")
const Ajv = require("ajv")
const newid = require("../../db/newid")
const ajv = new Ajv()
exports.create = async function(ctx) {
const db = new CouchDB(ctx.params.instanceId)
const workflow = ctx.request.body
@ -28,7 +26,6 @@ exports.create = async function(ctx) {
// return
// }
workflow.type = "workflow"
const response = await db.post(workflow)
workflow._rev = response.rev
@ -38,9 +35,9 @@ exports.create = async function(ctx) {
message: "Workflow created successfully",
workflow: {
...workflow,
...response
}
};
...response,
},
}
}
exports.update = async function(ctx) {

View file

@ -98,5 +98,5 @@ exports.insertDocument = async (databaseId, document) => {
}
exports.destroyDocument = async (databaseId, documentId) => {
return await new CouchDB(databaseId).destroy(documentId);
}
return await new CouchDB(databaseId).destroy(documentId)
}

View file

@ -2,22 +2,22 @@ const WORKFLOW_SCHEMA = {
properties: {
type: "workflow",
pageId: {
type: "string"
type: "string",
},
screenId: {
type: "string"
type: "string",
},
live: {
type: "boolean"
type: "boolean",
},
uiTree: {
type: "object"
type: "object",
},
definition: {
type: "object",
properties: {
triggers: { type: "array" },
next: {
next: {
type: "object",
properties: {
type: { type: "string" },
@ -25,14 +25,14 @@ const WORKFLOW_SCHEMA = {
args: { type: "object" },
conditions: { type: "array" },
errorHandling: { type: "object" },
next: { type: "object" }
}
next: { type: "object" },
},
},
}
}
}
};
},
},
},
}
module.exports = {
WORKFLOW_SCHEMA
};
WORKFLOW_SCHEMA,
}