snapCloud icon indicating copy to clipboard operation
snapCloud copied to clipboard

JSON Response with status code for Admins Verifying Accounts, especially for already verified users

Open ochan1 opened this issue 4 years ago • 0 comments

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 https://github.com/snap-cloud/SnapSite/pull/111, but this Pull Request is not dependent on that one (but the SnapSite Pull Request is dependent on this snapCloud Pull Request)

ochan1 avatar Nov 05 '21 18:11 ochan1