diff --git a/SE_API/UserRoutes.py b/SE_API/UserRoutes.py index ddb5202..e487f2a 100644 --- a/SE_API/UserRoutes.py +++ b/SE_API/UserRoutes.py @@ -29,11 +29,11 @@ auto = Autodoc() @user_routes.route('/api/users/getUserByToken/', methods=["GET"]) @auto.doc() def getUserByToken(token): - ''' - This Function is will Activate a user and add tha campus to it + """ + >This Call will return a user by a given token
Route Parameters
- - validation_token: 'seToken|email_suffix' + - seToken: 'seToken'

Payload
@@ -45,20 +45,20 @@ def getUserByToken(token): 200 - JSON Example:
{
- 'username' : 'github_username',
- 'name' : 'Bob Dylan',
- 'email' : 'email@domain.com',
- 'isLecturer' : true,
- 'seToken' : 'dds2d-sfvvsf-qqq-fdf33-sfaa',
- 'avatar_url' : 'http://location.domain.com/image.jpg',
- 'isFirstLogin' : false,
- 'campuses_id_list': ['22314','243512',...,'356'],
- 'classes_id_list': ['22314','243512',...,'356']
+ 'username': 'DarkLord',
+ 'name': 'Darth Vader',
+ 'email': 'darkLord@death.planet,
+ 'isLecturer': 'True',
+ 'seToken': 'xxxxxx-xxxxx-xxxxx-xxxxxx',
+ 'avatar_url': 'http://location.git.com/somthing'
+ 'isFirstLogin': False,
+ 'campuses_id_list': ['JCA','JCB','JCC'],
+ 'classes_id_list': ['a','b','c']
}

- 403 - Invalid Token - ''' + 403 - No User Found + """ query = User.all() query.filter("seToken = ", token)