Skip to content

Commit 006110f

Browse files
codedsuniamareebjamal
authored andcommitted
chore(docs): Added auth/verify-email endpoint in documentation (fossasia#6602)
1 parent bb504da commit 006110f

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/api/blueprint/auth/email_verification.apib

+25
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,28 @@ Sends the token to verify the account associated with the provided email id via
2727
{
2828
"message": "Verification email resent"
2929
}
30+
31+
## Verify Email [/v1/auth/verify-email]
32+
33+
### Verify the email via auth token [POST]
34+
Verifies the user email via token.
35+
36+
+ Request
37+
38+
+ Headers
39+
40+
Content-Type: application/json
41+
42+
+ Body
43+
44+
{
45+
"data": {
46+
"token": "your token"
47+
}
48+
}
49+
50+
+ Response 200 (application/json)
51+
52+
{
53+
"message": "Email Verified"
54+
}

tests/hook_main.py

+9
Original file line numberDiff line numberDiff line change
@@ -4199,6 +4199,15 @@ def reset_password_patch(transaction):
41994199
db.session.commit()
42004200

42014201

4202+
@hooks.before("Email Verification > Verify Email > Verify the email via auth token")
4203+
def verify_email_from_token(transaction):
4204+
"""
4205+
POST /v1/auth/verify-email
4206+
:param transaction:
4207+
:return:
4208+
"""
4209+
transaction['skip'] = True
4210+
42024211
# ------------------------- Custom System Role -------------------------
42034212

42044213
@hooks.before("Custom System Roles > Custom System Roles Collections > List All Custom System Roles")

0 commit comments

Comments
 (0)