andela / ah-kgl-wakanda-backend

0 stars 5 forks source link

#166057261 Prevent articles from being deleted but deactivated #40

Closed gracelungu closed 5 years ago

gracelungu commented 5 years ago

What does this PR do?

This PR will prevent the articles from being deleted.

Description of Task to be completed?

~ Create a new field for articles called active. ~ Replace the destroy method with an update. ~ Update the endpoint to get all and specific article to only retrieve active ones.

How should this be manually tested?

This can be tested using postman and the API documentation for reference. ~ First clone the repo https://github.com/andela/ah-kgl-wakanda-backend.git . ~ Install the required dependencies using npm install && npm start ~ In the web browser open the API doc at localhost:3000/doc for reference ~ Use postman to test, with specifications found in the documentation. ~ In the database the article information is still present.

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

166057261

Screenshots (if appropriate)

N/A

Questions:

N/A