Skip to content

Backend project with Node, Express, Sequelize, Nodemailer and JWT for Alkemy challenge

Notifications You must be signed in to change notification settings

zayrarepositor/disney-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

disney-api

Backend project with nodejs, express and sequilize for alkemy.

DataBase

  • Character: ○ Image. ○ Name. ○ Age. ○ Weight. ○ History. ○ Movies associated.
  • Movie: ○ Image. ○ Title. ○ Date. ○ Rating. ○ Characters associated.
  • Genre: ○ Name. ○ Image. ○ Movies associated.

Sign up, Log in & Users Authentication.

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"

Characters Endpoints

  • 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

Movies Endpoints

  • 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.

Mailing

When you successfully register yourself, you will receive a mail notification. Tech: Nodemailer

Snips.

Tech for Requests: ThunderClient

  • Characters

☑ DELETE

characters-delete

☑ GET ALL CHARACTERS

characters-get

☑ GET BY AGE

characters-getage

☑ GET BY MOVIE

characters-getmovies

☑ GET BY NAME

characters-getname

☑ GET BY WEIGHT

characters-getweight

☑ POST

characters-post

☑ GET BY AGE

characters-post2

☑ PUT

characters-put

  • Genres

☑ DELETE

genres-delete

☑ GET ALL GENRES

genres-get

☑ POST

genres-post

☑ PUT

genres-put

  • Movies

☑ DELETE

movies-delete

☑ GET ALL MOVIES

movies-get

☑ GET ALL MOVIES ORDER ASC

movies-getASCorder

☑ GET ALL MOVIES ORDER DESC

movies-getDESCorder

☑ GET BY GENRE

movies-getgenre

☑ GET BY GENRE ORDER ASC

movies-getgenreASCorder

☑ GET BY GENRE ORDER DESC

movies-getgenreDESCorder

☑ GET BY NAME

movies-getname

☑ POST

movies-post

☑ POST

movies-post2

☑ PUT

movies-put

  • Registration

☑ SUCCESSFUL REGISTRATION RESPONSE

mailingResponse

☑ SUCCESSFUL REQUEST WITH TOKEN AFTER REGISTRATION

authsuccessful

☑ FAILED REQUEST WITHOUT TOKEN

authfailed

  • Login

☑ MAIL VALIDATION

authloginIncorrectemail

☑ PASSWORD VALIDATION

authloginIncorrectpassword

☑ SUCCESSFUL LOGIN

authloginsuccesfully

  • Mailing

☑ NOTIFICATION MAIL

mailingMail

Good Life! ( ͡~ ͜ʖ ͡°)

About

Backend project with Node, Express, Sequelize, Nodemailer and JWT for Alkemy challenge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published