Using ES Modules

This commit is contained in:
Daniel Hutzel
2024-07-16 15:29:45 +02:00
parent 7a2e345cd5
commit cba8e0cc5c
12 changed files with 25 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
const cds = require('@sap/cds')
import cds from '@sap/cds'
class CatalogService extends cds.ApplicationService { init() {
export class CatalogService extends cds.ApplicationService { init() {
const { Books } = cds.entities('sap.capire.bookshop')
const { ListOfBooks } = this.entities
@@ -34,5 +34,3 @@ class CatalogService extends cds.ApplicationService { init() {
// Delegate requests to the underlying generic service
return super.init()
}}
module.exports = CatalogService