Backend API for the DevCamper application to manage bootcamps, courses,reviews,users and authentication
Routes for user authentication including register, login, reset password etc.
this is going to generate password token and send email
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json |
clear token cookie
Add user to database with encrypted password.
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
reset use password using token
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
update logged in user’s name and email
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
update logged in user’s password ,send in the body current Password and newPassword
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
login user and return token(it has user id and some other details ex: expired at)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
Bootcamps CRUD functionality
Add new bootcamp to database. Must be authenticated and must be publisher or admin
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
| Authorization | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNzFiMzQxNmJiYjRiMWU5Y2MyZjdhZiIsImlhdCI6MTYwMTMxNjI1MSwiZXhwIjoxNjAzOTA4MjUxfQ.QRscrPPD7EF-whIjXB76-4wB79Fw4NSt1hCQ5l2T19A |
Delete bootcamp from database
Fetch all bootcamps from database. Includes pagination filtering, etc.
get only name id and description and are sorted in descending oreder as -name is written
| Key | Value | Description |
|---|---|---|
| select | name,description | |
| sort | -name |
Get single bootcamp by ID
Get bootcamps within a radius of a specific zipcode
Update single bootcamp in database by ID
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
route to upload photo of a bootcamp
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
create read update and delete courses CRUD
Create a course for a specific bootcamp
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
Delete a course from a bootcamp
GET courses for a specific bootcamp
GET all courses in database
Update course in database
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
Manage course reviews
Insert review for a specific bootcamp
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
Delete review form the database
Fetch a review from database by id And populate bootcamp name and description
Get all reviews from the database and populate it with bootcamp name and description
Fetch the reviews for the specific bootcamp
update review in the database
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
All CRUD functionality for an admin
Create user to database (admin)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |
delete user from database (admin)
get all users after logged in as an admin
Get single user by id
update user in database (admin)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | JSON Type |