Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix media server #779

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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