#164046251: Implement CRUD for articles module #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements CRUD on articles module. Users should be able to create articles once they are registered. Users can view any article that is published and is still active. A user should be able to update and delete his/her own articles. He/she should also have the ability to publish articles.
The following endpoints are covered in this PR
POST
articles/create
- Create an article. Authentication is required.GET
articles
- Get all articles. No authentication is required.GET
articles/<slug:slug>
- Returns an article. No authentication is required.PUT
articles/<slug:slug>/edit
- Update and article. Authentication is required and you must be the article owner.PATCH
articles/<slug:slug>/edit
- Publish an article. Authentication is required and you must be the article owner.DELETE
articles/<slug:slug>/edit
- Deletes an article. Authentication is required and you must be the article owner.Type of change
How has this been tested
Checklist:
Related Stories
Create Article PT Story