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

Fix the Error handling for Activation API #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sagrawal3-godaddy
Copy link

No description provided.

@sagrawal3-godaddy
Copy link
Author

Please review and merge
@restuwahyu13 restuwahyu13

@restuwahyu13
Copy link
Owner

@sagrawal3-godaddy thanks for your pull request, but ctx.params already exist, and for params not required shouldbinjson

@sagrawal3-godaddy
Copy link
Author

@restuwahyu13

  1. ctx.params already exist :
    It is present at line 52. However the token is validated before that at line 40 "accessToken is required on params"

  2. params not required shouldbinjson :
    It is required for request body which has email field validation at line 30 "email is required on body".
    Request body :
    {
    "email": "[email protected]",
    "active": true
    }

  3. Postman collection is also missing the example request body in activation api.

FYI : I have just started learning GO language. I might be looking in totally different direction.

@restuwahyu13
Copy link
Owner

restuwahyu13 commented Jan 3, 2022

@sagrawal3-godaddy ya body is required shouldbinjson, but params is not required shouldbinjson its work, please check gin documentation about params, activation API is not required parameter on body, just required parameter on params like this /api/v1/activation/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 and this link you can get from email after register success, for activation account

check this tutorial for basic fundamental go: https://gobyexample.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants