-
Notifications
You must be signed in to change notification settings - Fork 4
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
Question: how to inject additional info like request userId? #11
Comments
Hello, @lzkill However, I hope that your idea will come true. I'll think about a method, but it will require additional code to use. |
Oh, I'll take a look. Thanks @lzkill 😀 |
typeorm/typeorm#4537 demonstrates how to pass metadata that can be used within the subscriber. This, combined, with updating |
you can use AsyncDataStorage or (if you are using NestJS) CLS. beforeUpdate(event: UpdateEvent<BaseEntity>) {
event.entity.updatedBy = this.cls.get('user');
} |
The docs say something about cuatom vars in the auditing entity, but how can I populate such a variable with the request userId?
The text was updated successfully, but these errors were encountered: