Skip to content
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

#167129854 Fetch all blocked articles #71

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

deschantkn
Copy link
Contributor

@deschantkn deschantkn commented Jul 9, 2019

What does this PR do?

Admin or moderator can fetch blocked and reported articles

Description of Task to be completed?

Have the following endpoints working:

  • GET - /api/articles/blocked/all
  • GET - /api/articles/reported/all

How should this be manually tested?

This PR can be tested using Postman after checking into this branch

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#167129854 #167151057

Screenshots (if appropriate)

N/A

Questions:

N/A

@deschantkn deschantkn force-pushed the ft-fetch-blocked-article-167129854 branch 2 times, most recently from 51514a6 to b7ebb17 Compare July 10, 2019 07:36
*/
static async getBlockedArticles(req, res) {
const blockedArticles = await BlockedArticles.findAll({});
return res.status(200).json({ status: 200, data: blockedArticles || [] });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns an empty array by default, in case there is no blocked article.

*/
static async getReportedArticles(req, res) {
const reportedArticles = await ReportedArticles.findAll({});
return res.status(200).json({ status: 200, data: reportedArticles || [] });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here.

- get all reported articles
- get all blocked articles
@deschantkn deschantkn force-pushed the ft-fetch-blocked-article-167129854 branch from b7ebb17 to 00dea73 Compare July 10, 2019 14:33
Copy link

@Quantum-35 Quantum-35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Quantum-35 Quantum-35 merged commit ffa16a7 into develop Jul 11, 2019
Diama1 pushed a commit that referenced this pull request Jul 17, 2019
- get all reported articles
- get all blocked articles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants