rm complexity
This commit is contained in:
@@ -4,10 +4,9 @@ const { Books } = cds.entities
|
||||
/** Service implementation for CatalogService */
|
||||
module.exports = cds.service.impl(async function () {
|
||||
const bupaSrv = await cds.connect.to('API_BUSINESS_PARTNER')
|
||||
const { A_BusinessPartnerAddress } = bupaSrv.entities
|
||||
this.after('READ', 'Books', each => each.stock > 111 && _addDiscount2(each, 11))
|
||||
this.before('CREATE', 'Orders', _reduceStock)
|
||||
this.on('READ', 'Addresses', req => bupaSrv.run(req.query.from(A_BusinessPartnerAddress)))
|
||||
this.on('READ', 'Addresses', req => bupaSrv.tx(req).run(req.query))
|
||||
})
|
||||
|
||||
/** Add some discount for overstocked books */
|
||||
|
||||
Reference in New Issue
Block a user