-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Approve reject super status admin #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
The test warns of a deprecation in Mongoose, which can be resolved by adding
useFindAndModify: false
to the config options in dbConnection.js
Also...
When I change the admin string in the component to a made up value, the API returns 500 error, but it would make more sense to get a 400 or 403 as the admin ID passed is invalid - is it possible to add some error handling for this?
…for manageUserStatus and AllUsers component for invalid admin ID
I've refactored usePostPatchPut into useApiCallback, as what it really allows us to do is create a callback to be used one or more times that makes an API call and then updates state. The method you choose to use is not important to the hook, and it will allow you to use any method, including GET, with or without a data payload. This allows the hook to be used more or less as it is, without having to create more local state to store it in. |
…us is updated relates #75
relates to #77, #76, #7
ADMIN USER CAN APPROVE / REJECT SUPER USER AND USER VERIFICATIONS
to test rebuild db, go to Admin/Users/AllUsers.js and modify
then go to admin control panel and hit users...