Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
danjoa committed Jan 31, 2025
1 parent 8c6ba30 commit 23bea0f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions bookstore/srv/mashup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module.exports = async()=>{ // called by server.js
//
CatalogService.on ('OrderedBook', async (msg) => {
const { book, quantity, buyer } = msg.data
const { title, price } = await db.tx(msg).read (Books, book, b => { b.title, b.price })
return OrdersService.tx(msg).create ('Orders').entries({
const { title, price } = await db.read (Books, book, b => { b.title, b.price })
return OrdersService.create ('Orders').entries({
OrderNo: 'Order at '+ (new Date).toLocaleString(),
Items: [{ product:{ID:`${book}`}, title, price, quantity }],
buyer, createdBy: buyer
Expand Down
100 changes: 50 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
{
"name": "@capire/samples",
"version": "2.1.0",
"description": "A monorepo with several samples for CAP.",
"repository": "https://github.com/sap-samples/cloud-cap-samples.git",
"author": "[email protected]",
"dependencies": {
"@sap/cds": ">=8"
},
"workspaces": [
"./bookshop",
"./bookstore",
"./common",
"./data-viewer",
"./fiori",
"./hello",
"./media",
"./orders",
"./loggers",
"./reviews"
],
"devDependencies": {
"@cap-js/cds-types": "^0",
"@cap-js/sqlite": "^1",
"axios": "^1",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"eslint": "^9",
"semver": "^7"
},
"scripts": {
"bookshop": "cds watch bookshop",
"start": "cds watch fiori",
"fiori": "cds watch fiori",
"hello": "cds watch hello",
"media": "cds watch media",
"lint": "eslint",
"test": "npx jest --silent",
"jest": "npx jest --silent",
"mocha": "CDS_TEST_SILENT=y npx mocha",
"test:hello": "cd hello && npm test"
},
"mocha": {
"recursive": true,
"parallel": true,
"timeout": 6666
},
"license": "SEE LICENSE IN LICENSE",
"private": true
}
"name": "@capire/samples",
"version": "2.1.0",
"description": "A monorepo with several samples for CAP.",
"repository": "https://github.com/sap-samples/cloud-cap-samples.git",
"author": "[email protected]",
"dependencies": {
"@sap/cds": ">=8"
},
"workspaces": [
"./bookshop",
"./bookstore",
"./common",
"./data-viewer",
"./fiori",
"./hello",
"./media",
"./orders",
"./loggers",
"./reviews"
],
"devDependencies": {
"@cap-js/cds-types": "^0",
"@cap-js/sqlite": "^1",
"axios": "^1",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"eslint": "^9",
"semver": "^7"
},
"scripts": {
"bookshop": "cds watch bookshop",
"start": "cds watch fiori",
"fiori": "cds watch fiori",
"hello": "cds watch hello",
"media": "cds watch media",
"lint": "eslint",
"test": "npx jest --silent",
"jest": "npx jest --silent",
"mocha": "CDS_TEST_SILENT=y npx mocha",
"test:hello": "cd hello && npm test"
},
"mocha": {
"recursive": true,
"parallel": true,
"timeout": 6666
},
"license": "SEE LICENSE IN LICENSE",
"private": true
}

0 comments on commit 23bea0f

Please sign in to comment.