This commit is contained in:
mike12345567 2020-10-29 10:55:52 +00:00
parent 91d9e4d41e
commit a43777c78b
1 changed files with 2 additions and 4 deletions

View File

@ -66,8 +66,7 @@ exports.patch = async function(ctx) {
row._rev = response.rev row._rev = response.rev
row.type = "row" row.type = "row"
ctx.eventEmitter && ctx.eventEmitter && ctx.eventEmitter.emitRow(`row:update`, appId, row, table)
ctx.eventEmitter.emitRow(`row:update`, appId, row, table)
ctx.body = row ctx.body = row
ctx.status = 200 ctx.status = 200
ctx.message = `${table.name} updated successfully.` ctx.message = `${table.name} updated successfully.`
@ -133,8 +132,7 @@ exports.save = async function(ctx) {
const response = await db.post(row) const response = await db.post(row)
row._rev = response.rev row._rev = response.rev
ctx.eventEmitter && ctx.eventEmitter && ctx.eventEmitter.emitRow(`row:save`, appId, row, table)
ctx.eventEmitter.emitRow(`row:save`, appId, row, table)
ctx.body = row ctx.body = row
ctx.status = 200 ctx.status = 200
ctx.message = `${table.name} created successfully` ctx.message = `${table.name} created successfully`