Merge pull request #41 from sagidayan/API_Dev
added option to change campus name
This commit is contained in:
commit
cd6d428dd8
2 changed files with 8 additions and 1 deletions
|
@ -84,7 +84,8 @@ def updateUser(token):
|
||||||
- JSON Object, Example: <br>
|
- JSON Object, Example: <br>
|
||||||
{<br>
|
{<br>
|
||||||
'name': 'new name',<br>
|
'name': 'new name',<br>
|
||||||
'isLecturer': true<br>
|
'isLecturer': true,<br>
|
||||||
|
'campusName': 'JCE'<br>
|
||||||
}<br>
|
}<br>
|
||||||
<br>
|
<br>
|
||||||
<b>Response</b>
|
<b>Response</b>
|
||||||
|
@ -111,6 +112,11 @@ def updateUser(token):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
user.campusName = payload['campusName']
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user.isLecturer = payload['isLecturer']
|
user.isLecturer = payload['isLecturer']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -12,6 +12,7 @@ class User(db.Model):
|
||||||
seToken = db.StringProperty(required=True)
|
seToken = db.StringProperty(required=True)
|
||||||
avatar_url = db.StringProperty(required=True)
|
avatar_url = db.StringProperty(required=True)
|
||||||
isFirstLogin = db.BooleanProperty(default=True)
|
isFirstLogin = db.BooleanProperty(default=True)
|
||||||
|
campusName = db.StringProperty(required=True, default="")
|
||||||
campuses_id_list = db.StringListProperty(default=[])
|
campuses_id_list = db.StringListProperty(default=[])
|
||||||
classes_id_list = db.StringListProperty(default=[])
|
classes_id_list = db.StringListProperty(default=[])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue