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

Create a backend route that handles the POST request and stores the blog data in the database. #17

Closed
krab7191 opened this issue Oct 14, 2020 · 0 comments
Labels
Backend Pertaining to server, DB, routes, etc. enhancement New feature or request story This describes a small unit of development work

Comments

@krab7191
Copy link
Collaborator

krab7191 commented Oct 14, 2020

This will be one of the most used endpoints, handling blog posts when they are created.

Acceptance criteria

  • Create a POST endpoint at /api/blogpost which takes the following post body:
{
  title: string, required, validate short-ish length
  body: string, required,
  creationDate: generated on the server side, so no one can mess with it.
  author: string required, userid, pulled from user object on the backend. (current authenticated user, so can't be spoofed)
}
  • Validates the above data
  • Calls into a service which stores in the database and returns blogpost entry _id to the frontend.
@krab7191 krab7191 mentioned this issue Oct 14, 2020
3 tasks
@krab7191 krab7191 added Backend Pertaining to server, DB, routes, etc. enhancement New feature or request story This describes a small unit of development work labels Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Pertaining to server, DB, routes, etc. enhancement New feature or request story This describes a small unit of development work
Projects
None yet
Development

No branches or pull requests

1 participant