This is the eighth challenge in the series for cloudHub, where we are expanding on our API that was created in another challenge. These APIs are a series of endpoints built using swagger, nodeJS and mongodb. We have built the first iteration of the APIs, but are looking to expand and clean up the code base. In the forum we will upload the current code, which now includes the seed data script in /seed. Any submissions can skip the seed setup and just focus on validation and updates listed below.
Here are the user levels and their access to the data:
user - Limited API access to the system, longer valid token.
admin - Access to all information for only their company.
super-admin - Access to all information for all companies.
1. We are going to make companyApps a subdocument within the company collection. (Update seed.js too)
2. Add test coverage with mocha for the API endpoints.
3. Verify all endpoints succeed with new required and unique fields in model.
4. Verify that user and admin roles are restricted to their company.
5. Update user endpoints to allow adding user with password that gets encrypted and an endpoint to reset password.
We have added eslint to the project and any submission needs to pass the linter.