file-based not needed
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
"--credentials": {
|
||||
"destination": "cap-api098"
|
||||
}
|
||||
},
|
||||
"messaging": {
|
||||
"kind": "file-based-messaging"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ service CatalogService {
|
||||
Country
|
||||
};
|
||||
|
||||
event ContactDetailsChanged {
|
||||
event OrdersOutdated {
|
||||
orders: array of my.Orders
|
||||
}
|
||||
};
|
||||
|
||||
@requires_: 'authenticated-user'
|
||||
@insertonly entity Orders as projection on my.Orders;
|
||||
|
||||
@@ -11,9 +11,8 @@ module.exports = cds.service.impl(async function () {
|
||||
console.log('>> Received message', msg.data)
|
||||
const BUSINESSPARTNER = msg.data.KEY[0].BUSINESSPARTNER
|
||||
const orders = await cds.tx(msg).run(SELECT.from(Orders).where({ createdBy: BUSINESSPARTNER }))
|
||||
const payload = { orders }
|
||||
this.emit('ContactDetailsChanged', payload)
|
||||
console.log('<< Emitting message', payload)
|
||||
this.emit('OrdersOutdated', { orders })
|
||||
console.log('<< Emitting message', { orders })
|
||||
})
|
||||
|
||||
/** Add some discount for overstocked books */
|
||||
|
||||
Reference in New Issue
Block a user