You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to have a route for creating and editing news/event articles. These articles will appear in the News and Events section, and will serve as records of HoMEwork activity.
For your PR:
Create a schema for an article type on the backend (like this one)
header (title)
dateCreated
author
body (contents of the article, optional)
thumbnail (optional string, should be a file url to an image. We will implement this with our image uploading feature)
Perform validation on all fields using express validator.
Create the following backend routes:
POST api/articles/create
a. Create a new article in our database
GET api/articles/all
a. Request an object containing all articles in our database.
PUT api/articles/:id
a. Update the fields of a specific article
Do not worry about auth token validation for these routes, we will implement that with the frontend form.
For testing, show each of these routes working on curl/postman. Show that the backend will reject invalid request bodies (empty/missing fields, improperly formatted date, etc)
The text was updated successfully, but these errors were encountered:
We want to have a route for creating and editing news/event articles. These articles will appear in the News and Events section, and will serve as records of HoMEwork activity.
For your PR:
Create a schema for an article type on the backend (like this one)
Perform validation on all fields using express validator.
Create the following backend routes:
a. Create a new article in our database
a. Request an object containing all articles in our database.
a. Update the fields of a specific article
Do not worry about auth token validation for these routes, we will implement that with the frontend form.
For testing, show each of these routes working on curl/postman. Show that the backend will reject invalid request bodies (empty/missing fields, improperly formatted date, etc)
The text was updated successfully, but these errors were encountered: