denylie / AD320-power-team

0 stars 2 forks source link

Vendor Scenario: Vendor opens the app #12

Open nataliagourova opened 4 years ago

nataliagourova commented 4 years ago

Given the Vendor is on the main login page When they enter their login information or the information is pre-populated form cookies and they hit “log in” button Then the data is submitted, processed, and the main Welcome page is displayed

nataliagourova commented 4 years ago

End Point the app listens and gets login and password from api/vendors/login POST endpoint The data is sent to back-end for processing (see next endpoint), callback function displays "incorrect login information", response ends or "login successful" and calls the next middleware function that loads up the welcome page, response ends.

the login information is passed in and middleware makes a call to compare the login credentials to what is stored in the database. If there is a match, login is successful, otherwise it is not successful, and login endpoint will display appropriate message, response ends