Create the routes for logging in and signing up. When a user signs up, they should be automatically logged in. Write controller functions that connect the service functions to these routes. Ensure you put validation functions before their respective controller function. Write integration tests using Jest to verify functionality.
Tasks
[x] Login /api/login
[x] Signup /api/signup
[x] Logout /api/logout
[x] Create a test for each route that should result in a 200 OK
[x] Create a test where an invalid email is given on login
[x] Create a test where an invalid password is given on login
[x] Create a test where logout does not work on a user that is not logged in
Put routes in a file called authRoutes.js in /server/routes
Put controllers in a file called authController.js in /server/controllers
Put tests in a file called auth.test.js in /tests/integrationTests/
Create the routes for logging in and signing up. When a user signs up, they should be automatically logged in. Write controller functions that connect the service functions to these routes. Ensure you put validation functions before their respective controller function. Write integration tests using Jest to verify functionality.
Tasks
Put routes in a file called authRoutes.js in /server/routes Put controllers in a file called authController.js in /server/controllers Put tests in a file called auth.test.js in /tests/integrationTests/