-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Api request : GET /api/blogs/getall
Goals
- just return literally all blogs in DB , except the ones the user created
- RETURN ONLY TITLES of the blogs along with blog id
- the only thing needed is userId
- this is a get request , use query params to pass userId in the request
- return a JSON response along with response status
- use
authmiddlewarei created as middleware to protect the route
Api request : GET /api/blogs/[blogId]
- return full blog data
- dont return tags for now atleast
- this is a get request , use query params to pass userId in the request
- return a JSON response along with response status
- use
authmiddlewarei created as middleware to protect the route
Prerequisites
- understand
awaitand async functions in Javascript - or just copy other pattern
- learn middlewares in express js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels