Skip to content

Commit

Permalink
fix media server
Browse files Browse the repository at this point in the history
  • Loading branch information
Akatuoro committed Nov 22, 2024
1 parent 33b7691 commit ee028e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit ee028e7

Please sign in to comment.