diff --git a/packages/server/src/api/controllers/user.js b/packages/server/src/api/controllers/user.js index f654caa4c0..5810872989 100644 --- a/packages/server/src/api/controllers/user.js +++ b/packages/server/src/api/controllers/user.js @@ -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) diff --git a/packages/server/src/api/controllers/workflow.js b/packages/server/src/api/controllers/workflow.js index 216ca6afd2..e257151d37 100644 --- a/packages/server/src/api/controllers/workflow.js +++ b/packages/server/src/api/controllers/workflow.js @@ -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) { diff --git a/packages/server/src/api/routes/tests/couchTestUtils.js b/packages/server/src/api/routes/tests/couchTestUtils.js index aa7a765d25..de4ed7f87e 100644 --- a/packages/server/src/api/routes/tests/couchTestUtils.js +++ b/packages/server/src/api/routes/tests/couchTestUtils.js @@ -98,5 +98,5 @@ exports.insertDocument = async (databaseId, document) => { } exports.destroyDocument = async (databaseId, documentId) => { - return await new CouchDB(databaseId).destroy(documentId); -} \ No newline at end of file + return await new CouchDB(databaseId).destroy(documentId) +} diff --git a/packages/server/src/schemas/index.js b/packages/server/src/schemas/index.js index 23a839bf97..9ab8736a7a 100644 --- a/packages/server/src/schemas/index.js +++ b/packages/server/src/schemas/index.js @@ -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 -}; \ No newline at end of file + WORKFLOW_SCHEMA, +}