-
Notifications
You must be signed in to change notification settings - Fork 4
feat(hawk-js): add setContext and setUser methods #130
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
Conversation
src/catcher.ts
Outdated
| * Clear current user information | ||
| */ | ||
| public clearUser(): void { | ||
| this.user = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default user id should be generated in this case
src/catcher.ts
Outdated
| public getCurrentUser(): AffectedUser | null { | ||
| return this.user; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant method
src/catcher.ts
Outdated
| public getCurrentContext(): EventContext | undefined { | ||
| return this.context; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any use case for that.
Problem: no simple way to update user and context data dynamically in runtime
Changes: implemented setContext and setUser methods