-> Added 5 routes:
- Sign Up -
- Added logic to decode body
- Checks if body contains both
email
andpassword
- Stores 'email' and 'password' (as it is for now) in the "USERS" array above (only if the user with the given email does not exist)
- Return back 200 status code to the client
- Login Route -
- Added logic to decode body
- Checks if body contains both
email
andpassword
- Checks if the user with the given email exists in the USERS array and also checks if the password is same : if NOT then sends status code - 401, if YES then a random token is generated and return that token to user with status code - 200
- Questions Route -
- Retrieve all the questions from question array
- Return the user all the questions in the question array
- All submissions Route -
- Returns all the submissions done by user (by using userId to filter)
- Submissions Route -
- Let the user submit a problem, randomly accept or reject the solution
- Store the submission in the SUBMISSION array above
- Route for leaving as hard todos
- Create a route that lets an admin add a problem
- Ensure that only admins can do that
(Plus some frontend )
- Nodejs,
- Expressjs,
- JavaScript and,
- Postman to test things out