Backend project with nodejs, express and sequilize for alkemy.
- Character: ○ Image. ○ Name. ○ Age. ○ Weight. ○ History. ○ Movies associated.
- Movie: ○ Image. ○ Title. ○ Date. ○ Rating. ○ Characters associated.
- Genre: ○ Name. ○ Image. ○ Movies associated.
Important You will need to register to endpoints access
- SIGN UP => /auth/register
==> REGISTRATION DATA YOU WILL SEND:
{
"username": "rodrigo",
"email": "anaturistaintegral@gmail.com",
"password": "rodrigossword123!",
"roleId": "user" //OPTIONAL
}
==> SUCCESSFUL REGISTRATION RESPONSE:
{
"msg": "Registration done! You are sign up",
"newUser": {
"id": 29,
"username": "rodrigo",
"email": "anaturistaintegral@gmail.com",
"password": "$2a$10$LDnEE29MLvChjiQo8gqW8upimaB7gTj/R.Pt86rCy/CAdrW8JVitG",
"roleId": 2
},
**Important** "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjksImlhdCI6MTY1OTAyNTM4NSwiZXhwIjoxNjU5MTExNzg1fQ.jFxM_aQIlRIdb6yBq8iXRjQ1G0Mn7qC8Hckrh7YsPMM"
"mailerMsg": "Check anaturistaintegral@gmail.com for confirmation and token copy"
}
- LOG IN => /auth/login
Email and password required.
Important token is required in all endpoints except GET endpoints. send it by header as "access-token"
- GET => /characters Get all characters
- POST => /characters Create a character
- PUT => /characters Edit a character
- DELETE => /characters Delete a character
- GET => /characters?name=name Filter by name: Character details and movies associated
- GET => /characters?age=age Filter by age: Character details and movies associated
- GET => /characters?weight=weight Filter by weight: Character details and movies associated
- GET => /characters?movies=idMovie Filter by movies character worked in: Character details
-
GET => /movies?order=ASC | DESC Get all movies. Could be ordered by creation date ASC or DESC.
-
POST => /movies Create a movie
-
PUT => /movies Edit a movie
-
DELETE => /movies Delete a movie
-
GET => /movies?name=name Filter by name: Movie details and characters associated
-
GET => /movies?genre=genre&order=ASC | DESC Filter by genre: Movie details and characters associated. Could be ordered by creation date ASC or DESC.
When you successfully register yourself, you will receive a mail notification. Tech: Nodemailer
Tech for Requests: ThunderClient
- Characters
☑ DELETE
☑ GET ALL CHARACTERS
☑ GET BY AGE
☑ GET BY MOVIE
☑ GET BY NAME
☑ GET BY WEIGHT
☑ POST
☑ GET BY AGE
☑ PUT
- Genres
☑ DELETE
☑ GET ALL GENRES
☑ POST
☑ PUT
- Movies
☑ DELETE
☑ GET ALL MOVIES
☑ GET ALL MOVIES ORDER ASC
☑ GET ALL MOVIES ORDER DESC
☑ GET BY GENRE
☑ GET BY GENRE ORDER ASC
☑ GET BY GENRE ORDER DESC
☑ GET BY NAME
☑ POST
☑ POST
☑ PUT
- Registration
☑ SUCCESSFUL REGISTRATION RESPONSE
☑ SUCCESSFUL REQUEST WITH TOKEN AFTER REGISTRATION
☑ FAILED REQUEST WITHOUT TOKEN
- Login
☑ MAIL VALIDATION
☑ PASSWORD VALIDATION
☑ SUCCESSFUL LOGIN
- Mailing
☑ NOTIFICATION MAIL
Good Life! ( ͡~ ͜ʖ ͡°)