Fixed access to cds.entities

This commit is contained in:
Daniel
2021-10-19 15:26:03 +02:00
committed by Daniel Hutzel
parent 7f6b87171a
commit b95df77b9a

View File

@@ -1,8 +1,9 @@
const cds = require('@sap/cds')
const { Books } = cds.entities ('sap.capire.bookshop')
class CatalogService extends cds.ApplicationService { init(){
const { Books } = cds.entities ('sap.capire.bookshop')
// Reduce stock of ordered books if available stock suffices
this.on ('submitOrder', async req => {
const {book,quantity} = req.data