Skip to content

Decorator for custom events #15

Closed Answered by dragolea
hakimio asked this question in Q&A
Dec 21, 2023 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

Regarding this question with the emit

await this.srv.emit('OrderedBook', { book, quantity, buyer: req.user.id });

You can use @Inject(SRV) private readonly srv : Service to access the CDS application service which can be used yo have the emit method

But currently we do not have a decorator for emit, we plan to have this feature in the near future.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@dragolea
Comment options

Comment options

You must be logged in to vote
1 reply
@dragolea
Comment options

Comment options

You must be logged in to vote
2 replies
@hakimio
Comment options

@dragolea
Comment options

Answer selected by hakimio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants