refactor import usage. refactor invoices implementation
This commit is contained in:
committed by
Daniel Hutzel
parent
bcfce87276
commit
3cf02cb567
@@ -1,4 +1,5 @@
|
||||
const cds = require("@sap/cds");
|
||||
const { importData } = require("./util/importData");
|
||||
// handle bootstrapping events...
|
||||
cds.on("bootstrap", (app) => {
|
||||
// dev only
|
||||
@@ -24,7 +25,8 @@ cds.on("bootstrap", (app) => {
|
||||
});
|
||||
// add your own middleware before any by cds are added
|
||||
});
|
||||
cds.on("served", () => {
|
||||
cds.on("served", async ({ db }) => {
|
||||
await importData(db);
|
||||
// add more middleware after all CDS servies
|
||||
});
|
||||
// delegate to default server.js:
|
||||
|
||||
Reference in New Issue
Block a user