Outputting the input record so that it can be used in later steps.

This commit is contained in:
mike12345567 2020-09-18 17:20:19 +01:00
parent d39a88e3dd
commit cfb10ebbe2
1 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,11 @@ module.exports.definition = {
}, },
outputs: { outputs: {
properties: { properties: {
record: {
type: "object",
customType: "record",
description: "The new record",
},
response: { response: {
type: "object", type: "object",
description: "The response from the table", description: "The response from the table",
@ -69,6 +74,7 @@ module.exports.run = async function({ inputs, instanceId }) {
try { try {
await recordController.save(ctx) await recordController.save(ctx)
return { return {
record: inputs.record,
response: ctx.body, response: ctx.body,
id: ctx.body._id, id: ctx.body._id,
revision: ctx.body._rev, revision: ctx.body._rev,