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