JSON Response with status code for Admins Verifying Accounts, especially for already verified users #306
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.
This adds backend logic to allow for processing one-by-one accounts approved for verification
The original code returns an HTML for when the user is already successfully verified, but it can cause the Cloud Request code to error when the verify_user is called using the Cloud.prototype.request in Snap!'s cloud.js since it assumes a JSON request
This modification returns an OK JSON when an admin with a token of 0 approves a user
An additional field showing the status code of the verification is used to allow for messages to be shown why a user has failed verification upon detection of a certain status code (Verified, Already Verified, or Failed Verification)
This does not preprocess users one by one but does show which users fall under each of the three categories
This was made in conjunction with snap-cloud/SnapSite#111, but this Pull Request is not dependent on that one (but the SnapSite Pull Request is dependent on this snapCloud Pull Request)