Bounty is a social network built around sharing recipes; more specifically, sharing and creating recipes for cold treats. Bounty's purpose is to crowd-source hard to find or non-existent recipes. Fulfill your cream-based cravings, and maybe make some friends on the way.
- Fork our repo GitHub
- Clone the repo
git clone
- Install dependencies
npm i
- Run tests
npm test
- Start a development server
npm start
POST
- Description: creates and returns user credentials from a JWT token
- Status code: (200)
- No json input
- Auth:
- Auth0 JWT
- Example output
{
"id": 1,
"email": "[email protected]",
"role": "guildMaster",
"permissions: ["read", "update", "create", "delete"]
}
POST
- Description: Creates a new bounty with an id and add it to the bounties table
- Status code: (200)
- Auth:
- Auth0 JWT
- 'create' permission
- JSON input:
- header: {string}
- content: {string}
- karma: {integer}
{
"id": 1,
"header": "foo",
"content": "bar",
"poster": "John Doe",
"karma": 100,
}
GET
- Description: Return a list of all bounties
- Status code:(200)
- Auth:
- Auth0 JWT
- 'read' permission
- No JSON Input
- Example output
{
"id": 1,
"header": "foo",
"content": "bar",
"poster": "John Doe",
"karma": 100,
}
PUT
- Description: Updates a bounty within the bounties table on a given id
- Status code:(200)
- Auth:
- Auth0 JWT
- 'update' permissions
- JSON input:
- header: {string}
- content: {string}
- poster: {string}
- Example output
{
"id": 1,
"header": "foo",
"content": "bar",
"poster": "John Doe"
}
GET
- Description: Return a bounty with related comments
- Status code:(200)
- Auth:
- Auth0 JWT
- 'read' permissions
- No JSON input
- Example output
{
"id": 1,
"header": "foo",
"content": "bar",
"poster": "John Doe",
"karma": 100,
"comments": [
{
"id": 1,
"bountyId": 1,
"header": "fizz",
"content": "buzz",
"poster": "Holly Doe",
"karma": 100
}
]
}
DELETE
- Description: Delete bounty from table
- Status code:(204)
- Auth:
- Auth0 JWT
- 'delete' permissions
- No JSON input
POST
- Description: Creates a comment record to comments table
- Status code:(200)
- Auth:
- Auth0 JWT
- 'create' permissions
- JSON input:
- header:{string}
- content:{string}
- poster:{string}
- Example output
{
"id": 1,
"bountyId": 1,
"header": "fizz",
"content": "buzz",
"poster": "Holly Doe",
}
PUT
- Description: update a comment from comments table on an given id
- Status code:(200)
- Auth:
- Auth0 JWT
- 'update' permissions
- JSON input:
- header:{string}
- content:{string}
- poster:{string}
- Example output
{
"id": 1,
"header":"fizz",
"content":"buzz",
"poster":"Holly Doe",
}
GET
- Description: return a comment from comments table on an given id
- Status code:(200)
- Auth:
- Auth0 JWT
- 'read' permissions
- No JSON input
- Example output
{
"id": 1,
"bountyId": 1,
"header": "fizz",
"content": "buzz",
"poster": "Holly Doe",
"karma": 100
}
DELETE
- Description: delete a comment from comments table on an given id
- Status code:(204)
- Auth:
- Auth0 JWT
- 'delete' permissions
- No JSON input