-
Notifications
You must be signed in to change notification settings - Fork 8
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
#167164993 add user notification #29
Conversation
8ae5054
to
c0346ed
Compare
c0346ed
to
e0c96f9
Compare
e0c96f9
to
73ca266
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.
I observed no screenshot attached
73ca266
to
06b50a2
Compare
06b50a2
to
debf3a4
Compare
debf3a4
to
8e9fc70
Compare
8e9fc70
to
02cfb9b
Compare
02cfb9b
to
c7c7483
Compare
Kindly place your screenshot as the last section of the PR description as stated in the template, and add a screenshot of your flowchart for this task. |
i am having a problem loading screenshot on the bottom, it seems to only show at the top |
docs/swagger.yaml
Outdated
@@ -14,7 +14,7 @@ externalDocs: | |||
url: https://github.com/andela/dahlia-ah-backend | |||
|
|||
servers: | |||
- url: /api/v1 | |||
- url: http://localhost:3000 |
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 observed you specified port 3000 above if another person is not using the same port number do you think it will still work.
c7c7483
to
23a1ec2
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.
LGTM
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.
LGTM
|
||
const getNotification = async (req, res) => { | ||
const { id } = req.user; | ||
const userNotificationObject = await getUserNotification(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.
I feel you could use a try/catch
block in this controller, in case an error occurs while awaiting getUserNotification(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.
Pls attend to this review
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.
done
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.
Attend to the feedback, as well as handle necessary errors in your code
|
||
const getNotification = async (req, res) => { | ||
const { id } = req.user; | ||
const userNotificationObject = await getUserNotification(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.
Pls attend to this review
src/helpers/emailMessages.js
Outdated
subject: 'Authors Haven - Notification', | ||
html: `${messageHeader} | ||
<p>${actor} ${message} | ||
<a href='${process.env.SERVER_URL}${novelUrl || ''}'> ${novelTitle || ''}</a></p> |
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.
Please consider a better implementation here
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.
done
23a1ec2
to
fd2badc
Compare
- add in app notification using socket.io - add email notification - add get all notification [Finishes #167164993]
fd2badc
to
c2398a0
Compare
Screenshots
response
![new](https://user-images.githubusercontent.com/47527863/63223873-cb8f8c80-c1b3-11e9-9c74-1dae22912673.png)
flow chart
Pivotal tracker story
#167164993
What does this PR do?
Add functions to create user notification
Summary of Task
This PR adds the following to the project
How can this be tested?