-
Notifications
You must be signed in to change notification settings - Fork 1
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
#170230517 Display all notification for a specific user #52
Conversation
src/helpers/notificationConfig.js
Outdated
@@ -0,0 +1,18 @@ | |||
import eventEmitters from './eventEmitters'; |
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.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
2997793
to
812c13d
Compare
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.
Nice work @NiyoEric I like the way you have re-used many functionalities and also refactored the existing notification code and this making my work easier, I have left one feedback, please have a look at it.
812c13d
to
dfadf5a
Compare
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.
Good job @NiyoEric
I like your modular coding techniques. I need to learn from you :)
src/services/NotificationService.js
Outdated
} else { | ||
receiverId = userId; // is a 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.
@NiyoEric How do you know who you are going to send the notification?
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.
If user id saved in trips table equal to user id from token, that means a user adds a comment. The notification should be sent to the manager. Vice versa.
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.
Okay, It makes sense.
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.
Good Job @NiyoEric, Kindly attend to the feedback I left.
dfadf5a
to
eb3aeef
Compare
eb3aeef
to
b1f1e1e
Compare
- add new route - [Finish #170230517]
b1f1e1e
to
face623
Compare
What does this PR do?
The PR displays all notifications for a specific user
Description of Task to be completed?
Acceptance Criteria
How should this be manually tested?
git clone https://github.com/andela/team-odd-bn-backend.git
cd team-odd-bn-backend
git checkout ft-all-user-notification-170230517
.env
file is updated.npm run db-migrate
psql
(Download if it's not installed)\c barefoot_nomad_test_db
to connect to the databaseSELECT * FROM {tableName}
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS;
to see the schemaAny background context you want to provide?
No
What are the relevant pivotal tracker stories?
#170230517
Screenshots (if appropriate)
All notification
Documentation
Questions: