This is an api server for a recipe database.
Currently supports REST-style http requests.
GraphQL queries -> /api/graphql
Method | URL | Description | Auth Token Req'd |
---|---|---|---|
GET | /api/recipes | get all recipes |
❌ |
POST | /api/recipes | create new recipe |
✔️ |
GET | /api/recipes/:id | get one recipe |
❌ |
PUT | /api/recipes/:id | update one recipe |
✔️ |
DELETE | /api/recipes/:id | delete one recipe |
✔️ |
POST | /api/recipes/:id/upvote | upvote one recipe |
✔️ |
POST | /api/recipes/:id/downvote | downvote one recipe |
✔️ |
POST | /api/recipes/:id/bookmark | add a bookmark one recipe |
✔️ |
DELETE | /api/recipes/:id/bookmark | remove a bookmark for one recipe |
✔️ |
GET | /api/users | show all users (debug only) |
❌ |
POST | /api/users | log in as a user |
❌ |
POST | /api/users/register | register a user |
❌ |
GET | /api/comments/:id | get one comment |
❌ |
POST | /api/comments/recipe/:id | create a comment for one post |
✔️ |
DELETE | /api/comments/:id | delete a comment |
✔️ |
GET | /api/comments/user/:id | get all comments by one user |
❌ |
GET | /api/comments/recipe/:id | get all comments on one recipe |
❌ |