1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00
This commit is contained in:
mike12345567 2020-10-29 10:55:52 +00:00
parent 91d9e4d41e
commit a43777c78b

View file

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