Skip to content
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

Fixed issue #87 #88

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@pAditya198
Copy link
Contributor

commented Jun 5, 2019

Fixes #87

Using GitHub search API I fetched if the total count of the username is 1 or not, if yes then the email verification is to be send otherwise shows an error.

Screenshot (27)

with existing username

Screenshot (28)

with wrong username.

pAditya198 added some commits Jun 5, 2019

@aashutoshrathi
Copy link
Member

left a comment

Since we are already checking for username, shouldn't we also disable the button if any of field is invalid?

@aashutoshrathi aashutoshrathi requested a review from yashLadha Jun 5, 2019

@yashLadha
Copy link
Member

left a comment

PTAL

@@ -70,35 +85,55 @@ $(function () {
const username = $('#username').val()
const email = $('#email').val()
console.log(username)

This comment has been minimized.

Copy link
@yashLadha

yashLadha Jun 5, 2019

Member

Is this necessary?

if (out.total_count === 1) {
fetch(`/sendmail/${username}/${email}`)
.then((res) => {
console.log(res)

This comment has been minimized.

Copy link
@yashLadha

yashLadha Jun 5, 2019

Member

Try to avoid logs when sending the final code.

This comment has been minimized.

Copy link
@pAditya198

pAditya198 Jun 5, 2019

Author Contributor

will take care of this in the future

timeout: 1000
})
})
}).catch(err => console.error(err))

This comment has been minimized.

Copy link
@yashLadha

yashLadha Jun 5, 2019

Member

How the user will be able to see this error? Maybe setting to an unexpected message would help though.

This comment has been minimized.

Copy link
@pAditya198

pAditya198 Jun 5, 2019

Author Contributor

I'll work on it.

pAditya198 added some commits Jun 5, 2019

@pAditya198

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

@aashutoshrathi

Since we are already checking for username, shouldn't we also disable the button if any of field is invalid?

Sir here what you want is to check for validation of the email as well or if any of the fields are invalid the request is further not processed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.