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