Backend API for the dev camper application to manage bootcamps, courses, reviews, users, and authentication.
Register, Login, Resetpassword, etc…
This route will generate password token and send email
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Get the logged in user using the jwt token
Key | Value | Description |
---|---|---|
Content-Type | application/json |
This route will log the user into the application and return a JWT token
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
This route is to register a user
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
This route lets users reset their password
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
id |
Update the logged in user name and email
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Updates the user password sent in the body
currentPassword and newPassword
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Route to log the current user out
Bootcamps CRUD functionality.
Add new bootcamps to database. Must be authenticated and must be publisher or admin.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Delete bootcamp from database.
Key | Value | Description |
---|---|---|
id |
Fetch all bootcamps from database. Includes pagination filtering.
Key | Value | Description |
---|---|---|
page | 2 | |
limit | 2 |
Get bootcamps within a radius of a specific zipcode
Key | Value | Description |
---|---|---|
zipcode | ||
distance |
Get single bootcamp by id.
Key | Value | Description |
---|---|---|
id |
Update single bootcamp in database.
Key | Value | Description |
---|---|---|
id |
This route lets users upload a file for a bootcamp
Key | Value | Description |
---|---|---|
bootcampId |
CRUD functionality for courses
Creates a course using the bootcamp id creating a reference.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
bootcampId |
This route deletes a single course
Key | Value | Description |
---|---|---|
id |
This request gets a single course with the associated
bootcamp using the populate method.
Key | Value | Description |
---|---|---|
id |
GET all the courses from the backend
GET the specific courses for a bootcamp
Key | Value | Description |
---|---|---|
bootcampId |
Update a single course in the database
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
id |
CRUD functionality to manage course reviews
This route adds a review to an associated bootcamp (user, admin) only.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
bootcampId |
Delete the review from the database
Key | Value | Description |
---|---|---|
id |
This route gets all the reviews
Get all the reviews for a specific bootcamp
Key | Value | Description |
---|---|---|
bootcampId |
Fetch single review from db populating the review with bootcamp name and description
Key | Value | Description |
---|---|---|
id |
Update review in database
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
id |
CRUD functionality for users only availabe to admins
Add user to db (admin)
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Delete the user from the db (admin)
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
id |
Thie route gets all the users (admin)
Gets the single user by id (admin)
Key | Value | Description |
---|---|---|
id |
Updae the user in the DB (admin)
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Content Type |
Key | Value | Description |
---|---|---|
id |