fix lint erorrs
This commit is contained in:
parent
aa128509c1
commit
aeb7c5dfc9
|
@ -61,7 +61,7 @@ exports.create = async function(ctx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.update = async function(ctx) {}
|
exports.update = async function() {}
|
||||||
|
|
||||||
exports.destroy = async function(ctx) {
|
exports.destroy = async function(ctx) {
|
||||||
const database = new CouchDB(ctx.params.instanceId)
|
const database = new CouchDB(ctx.params.instanceId)
|
||||||
|
|
|
@ -2,8 +2,6 @@ const CouchDB = require("../../db")
|
||||||
const Ajv = require("ajv")
|
const Ajv = require("ajv")
|
||||||
const newid = require("../../db/newid")
|
const newid = require("../../db/newid")
|
||||||
|
|
||||||
const ajv = new Ajv()
|
|
||||||
|
|
||||||
exports.create = async function(ctx) {
|
exports.create = async function(ctx) {
|
||||||
const db = new CouchDB(ctx.params.instanceId)
|
const db = new CouchDB(ctx.params.instanceId)
|
||||||
const workflow = ctx.request.body
|
const workflow = ctx.request.body
|
||||||
|
@ -28,7 +26,6 @@ exports.create = async function(ctx) {
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
workflow.type = "workflow"
|
workflow.type = "workflow"
|
||||||
const response = await db.post(workflow)
|
const response = await db.post(workflow)
|
||||||
workflow._rev = response.rev
|
workflow._rev = response.rev
|
||||||
|
@ -38,9 +35,9 @@ exports.create = async function(ctx) {
|
||||||
message: "Workflow created successfully",
|
message: "Workflow created successfully",
|
||||||
workflow: {
|
workflow: {
|
||||||
...workflow,
|
...workflow,
|
||||||
...response
|
...response,
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.update = async function(ctx) {
|
exports.update = async function(ctx) {
|
||||||
|
|
|
@ -98,5 +98,5 @@ exports.insertDocument = async (databaseId, document) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.destroyDocument = async (databaseId, documentId) => {
|
exports.destroyDocument = async (databaseId, documentId) => {
|
||||||
return await new CouchDB(databaseId).destroy(documentId);
|
return await new CouchDB(databaseId).destroy(documentId)
|
||||||
}
|
}
|
|
@ -2,16 +2,16 @@ const WORKFLOW_SCHEMA = {
|
||||||
properties: {
|
properties: {
|
||||||
type: "workflow",
|
type: "workflow",
|
||||||
pageId: {
|
pageId: {
|
||||||
type: "string"
|
type: "string",
|
||||||
},
|
},
|
||||||
screenId: {
|
screenId: {
|
||||||
type: "string"
|
type: "string",
|
||||||
},
|
},
|
||||||
live: {
|
live: {
|
||||||
type: "boolean"
|
type: "boolean",
|
||||||
},
|
},
|
||||||
uiTree: {
|
uiTree: {
|
||||||
type: "object"
|
type: "object",
|
||||||
},
|
},
|
||||||
definition: {
|
definition: {
|
||||||
type: "object",
|
type: "object",
|
||||||
|
@ -25,14 +25,14 @@ const WORKFLOW_SCHEMA = {
|
||||||
args: { type: "object" },
|
args: { type: "object" },
|
||||||
conditions: { type: "array" },
|
conditions: { type: "array" },
|
||||||
errorHandling: { type: "object" },
|
errorHandling: { type: "object" },
|
||||||
next: { type: "object" }
|
next: { type: "object" },
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
WORKFLOW_SCHEMA
|
WORKFLOW_SCHEMA,
|
||||||
};
|
}
|
||||||
|
|
Loading…
Reference in New Issue