Skip to content

Commit

Permalink
Merge branch 'main' into new-capire
Browse files Browse the repository at this point in the history
  • Loading branch information
danjoa authored Dec 18, 2024
2 parents 22709b8 + d1a4a65 commit 56ea989
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 61 deletions.
1 change: 1 addition & 0 deletions common/cds-plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// dummy to auto-load the plugin
7 changes: 7 additions & 0 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
"version": "1.0.0",
"dependencies": {
"@sap/cds": "*"
},
"cds": {
"requires": {
"@capire/common/data": {
"model": "@capire/common"
}
}
}
}
1 change: 1 addition & 0 deletions media/srv/media-service.cds
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using { sap.capire.media as db } from '../db/data-model';
namespace sap.capire.media;

@path: '/media-server'
service MediaServer {
entity Media as projection on db.Media ;
}
Expand Down
4 changes: 2 additions & 2 deletions media/srv/media-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = srv => {
})

srv.on('UPDATE', 'Media', (req, next) => {
const url = req._.req.path
const url = req.path
if (url.includes('content')) {
const id = req.data.id
const obj = mediaDB.get(id)
Expand All @@ -32,7 +32,7 @@ module.exports = srv => {
})

srv.on('READ', 'Media', (req, next) => {
const url = req._.req.path
const url = req.path
if (url.includes('content')) {
const id = req.data.id
const mediaObj = mediaDB.get(id)
Expand Down
122 changes: 63 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 56ea989

Please sign in to comment.