Skip to content

Commit

Permalink
fix: do not set cds.context.http
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Kunz committed Oct 10, 2024
1 parent 05150d1 commit a1faf5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cds-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,12 @@ class EventBroker extends cds.MessagingService {
Object.assign(msg.headers, headers)
if (this.isMultitenancy) msg.tenant = tenant

// for cds.context.http
msg._ = {}
msg._.req = req
msg._.res = res
// do not set cds.context.http
//msg._ = {}
//msg._.req = req
//msg._.res = res

const context = { user: cds.User.privileged, _: msg._ }
const context = { user: cds.User.privileged, /*_: msg._*/ }
if (msg.tenant) context.tenant = msg.tenant

await this.tx(context, tx => tx.emit(msg))
Expand Down

0 comments on commit a1faf5d

Please sign in to comment.