-
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
#161280586 user can get an authors article #44
Conversation
@@ -1,4 +1,9 @@ | |||
import GetAuthorsOfTheWeekHelpers from '../helpers/GetAuthorsOfTheWeekHelpers'; | |||
import models from '../models'; | |||
import helpers from '../helpers/helpers'; |
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.
Missing file extension for "../helpers/helpers" import/extensions
@@ -1,4 +1,9 @@ | |||
import GetAuthorsOfTheWeekHelpers from '../helpers/GetAuthorsOfTheWeekHelpers'; | |||
import models from '../models'; |
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.
Missing file extension for "../models" import/extensions
@@ -2,6 +2,7 @@ import chai from 'chai'; | |||
import chaiHttp from 'chai-http'; | |||
import app from '../server/app'; | |||
import GetAuthorsOfTheWeekHelpers from '../server/helpers/GetAuthorsOfTheWeekHelpers'; | |||
import generateToken from '../server/helpers/generateToken'; |
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.
Missing file extension for "../server/helpers/generateToken" import/extensions
@@ -1,9 +1,12 @@ | |||
import express from 'express'; | |||
import authorController from '../controllers/authorController'; | |||
import authorController, { getArticlesByAuthorsId } from '../controllers/authorController'; |
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.
Missing file extension for "../controllers/authorController" import/extensions
Pull Request Test Coverage Report for Build 621
💛 - Coveralls |
c7f50f4
to
82715ac
Compare
@@ -1,9 +1,13 @@ | |||
import express from 'express'; | |||
import authorController from '../controllers/authorController'; | |||
import authorController, { getArticlesByAuthorsId } from '../controllers/authorController'; | |||
import auth from '../middleware/auth'; |
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.
Missing file extension for "../middleware/auth" import/extensions
message: 'All articles', | ||
articles | ||
}) | ||
: res.status(404).jsend.success({ |
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.
Let's return an empty array if no articles are present
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.
Status 200
- Users can view the articles of an author [finishes #161280586]
82715ac
to
68f6e9d
Compare
What does this PR do?
Add an endpoint for fetching author's articles
Description of Task to be completed?
/authors/articles/:authorId
route to return all the articles the author has createdHow should this be manually tested?
Clone the repo, run npm install; using postman, hit the
/api/v1/authors/articles/:authorId
endpointWhat are the relevant pivotal tracker stories?
#161280586