remove bookshop service, rename app router directory

This commit is contained in:
Vladislav Leonkev
2024-12-20 15:52:13 +01:00
parent 44088c63c8
commit 480a16dfa2
14 changed files with 8 additions and 201 deletions

1
bookstore/srv/fiori.cds Normal file
View File

@@ -0,0 +1 @@
using from '../../fiori/app/services.cds';

View File

@@ -26,8 +26,7 @@ module.exports = async()=>{ // called by server.js
//
// Create an order with the OrdersService when CatalogService signals a new order
//
const messaging = await cds.connect.to('messaging')
messaging.on('CatalogService.OrderedBook', async (msg) => {
CatalogService.on ('OrderedBook', async (msg) => {
const { book, quantity, buyer } = msg.data
const { title, price } = await db.read (Books, book, b => { b.title, b.price })
return OrdersService.create ('OrdersNoDraft').entries({