-
Notifications
You must be signed in to change notification settings - Fork 73
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(notification-service): fix for notification user entry #90
Conversation
notifUser.isRead = false; | ||
await this.notificationUserRepository.create(notifUser); | ||
|
||
const receiversToCreate = notif.receiver.to.map(to => { |
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.
check for receiver null
|
||
const receiversToCreate = notif.receiver.to.map(to => { | ||
const notifUser = new NotificationUser(); | ||
notifUser.notificationId = notif.id || ''; |
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.
use ??
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.
to bypass type check failure
const notifUser = new NotificationUser(); | ||
notifUser.notificationId = notif.id || ''; | ||
notifUser.userId = to.id; | ||
notifUser.isRead = false; |
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.
no need to set. there is default
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.
sure
08bf01c
to
220eae6
Compare
e3a3596
to
feee76f
Compare
notifUser.isRead = false; | ||
await this.notificationUserRepository.create(notifUser); | ||
|
||
if (!notif.receiver || !notif.receiver.to) { |
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.
move this null check to inside the new function
feee76f
to
aa6f3d9
Compare
aa6f3d9
to
e9e6d4c
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
RFIT-568
Description
Notification user creation issue resolved .
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: