Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I have implemented a new property, admin, in the user schema. The property has a type of Number, and a default value of 0. I have also added authentication code to check if the user is an admin. I have added code, which is currently commented out, that only allows the user access to the adminDashboard route if they have an admin property of 1 (I.E. they are an admin). The commented-out authentication code causes failed admin dashboard testing when uncommented due to the mock user not having the admin property. I am unsure if I should flag this PR as requiring an update to testing.
Type of change
Please select everything applicable. Please, do not delete any lines.
Issue
Checklist:
npm run test
and all tests have passed successfully or I have included details within my PR on the failure.npm run lint
and resolved any outstanding errors. Most issues can be solved by executingnpm run format