Revert formatting to 80 print width
This commit is contained in:
parent
b6209d044a
commit
609b039d4c
|
@ -4,6 +4,5 @@
|
||||||
"singleQuote": false,
|
"singleQuote": false,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"plugins": ["prettier-plugin-svelte"],
|
"plugins": ["prettier-plugin-svelte"],
|
||||||
"svelteSortOrder" : "scripts-markup-styles",
|
"svelteSortOrder" : "scripts-markup-styles"
|
||||||
"printWidth": 100
|
|
||||||
}
|
}
|
|
@ -110,7 +110,9 @@ exports.save = async function(ctx) {
|
||||||
const doc = row.doc
|
const doc = row.doc
|
||||||
return {
|
return {
|
||||||
...doc,
|
...doc,
|
||||||
[model.name]: doc[model.name] ? [...doc[model.name], record._id] : [record._id],
|
[model.name]: doc[model.name]
|
||||||
|
? [...doc[model.name], record._id]
|
||||||
|
: [record._id],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -201,7 +203,10 @@ async function validate({ instanceId, modelId, record, model }) {
|
||||||
}
|
}
|
||||||
const errors = {}
|
const errors = {}
|
||||||
for (let fieldName in model.schema) {
|
for (let fieldName in model.schema) {
|
||||||
const res = validateJs.single(record[fieldName], model.schema[fieldName].constraints)
|
const res = validateJs.single(
|
||||||
|
record[fieldName],
|
||||||
|
model.schema[fieldName].constraints
|
||||||
|
)
|
||||||
if (res) errors[fieldName] = res
|
if (res) errors[fieldName] = res
|
||||||
}
|
}
|
||||||
return { valid: Object.keys(errors).length === 0, errors }
|
return { valid: Object.keys(errors).length === 0, errors }
|
||||||
|
|
|
@ -263,7 +263,11 @@ exports.builderEndpointShouldBlockNormalUsers = async ({
|
||||||
appId,
|
appId,
|
||||||
instanceId,
|
instanceId,
|
||||||
}) => {
|
}) => {
|
||||||
const headers = await createUserWithAdminPermissions(request, appId, instanceId)
|
const headers = await createUserWithAdminPermissions(
|
||||||
|
request,
|
||||||
|
appId,
|
||||||
|
instanceId
|
||||||
|
)
|
||||||
|
|
||||||
await createRequest(request, method, url, body)
|
await createRequest(request, method, url, body)
|
||||||
.set(headers)
|
.set(headers)
|
||||||
|
|
|
@ -37,13 +37,35 @@ const workflowValidator = joiValidator.body(Joi.object({
|
||||||
}).unknown(true))
|
}).unknown(true))
|
||||||
|
|
||||||
router
|
router
|
||||||
.get("/api/workflows/trigger/list", authorized(BUILDER), controller.getTriggerList)
|
.get(
|
||||||
.get("/api/workflows/action/list", authorized(BUILDER), controller.getActionList)
|
"/api/workflows/trigger/list",
|
||||||
.get("/api/workflows/logic/list", authorized(BUILDER), controller.getLogicList)
|
authorized(BUILDER),
|
||||||
|
controller.getTriggerList
|
||||||
|
)
|
||||||
|
.get(
|
||||||
|
"/api/workflows/action/list",
|
||||||
|
authorized(BUILDER),
|
||||||
|
controller.getActionList
|
||||||
|
)
|
||||||
|
.get(
|
||||||
|
"/api/workflows/logic/list",
|
||||||
|
authorized(BUILDER),
|
||||||
|
controller.getLogicList
|
||||||
|
)
|
||||||
.get("/api/workflows", authorized(BUILDER), controller.fetch)
|
.get("/api/workflows", authorized(BUILDER), controller.fetch)
|
||||||
.get("/api/workflows/:id", authorized(BUILDER), controller.find)
|
.get("/api/workflows/:id", authorized(BUILDER), controller.find)
|
||||||
.put("/api/workflows", authorized(BUILDER), workflowValidator, controller.update)
|
.put(
|
||||||
.post("/api/workflows", authorized(BUILDER), workflowValidator, controller.create)
|
"/api/workflows",
|
||||||
|
authorized(BUILDER),
|
||||||
|
workflowValidator,
|
||||||
|
controller.update
|
||||||
|
)
|
||||||
|
.post(
|
||||||
|
"/api/workflows",
|
||||||
|
authorized(BUILDER),
|
||||||
|
workflowValidator,
|
||||||
|
controller.create
|
||||||
|
)
|
||||||
.post("/api/workflows/:id/trigger", controller.trigger)
|
.post("/api/workflows/:id/trigger", controller.trigger)
|
||||||
.delete("/api/workflows/:id/:rev", authorized(BUILDER), controller.destroy)
|
.delete("/api/workflows/:id/:rev", authorized(BUILDER), controller.destroy)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue