Merge branch 'API_Dev'
This commit is contained in:
commit
f2fbd6617a
2 changed files with 5 additions and 5 deletions
|
@ -42,9 +42,9 @@ def create_course(token):
|
||||||
{<br>
|
{<br>
|
||||||
'courseName': 'Advance Math',<br>
|
'courseName': 'Advance Math',<br>
|
||||||
'campusName': 'JCE',<br>
|
'campusName': 'JCE',<br>
|
||||||
'startDate': '2015-14-3'<br>
|
'startDate': {'year': 2015, 'month' : 4, 'day' : 3}<br>
|
||||||
'endDate': '2015-29-6'<br>
|
'endDate': {'year': 2016, 'month' : 5, 'day' : 14}<br>
|
||||||
'taskFlag': 'False'<br>
|
'taskFlag': false<br>
|
||||||
}<br>
|
}<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
@ -67,8 +67,7 @@ def create_course(token):
|
||||||
try:
|
try:
|
||||||
payload = json.loads(request.data)
|
payload = json.loads(request.data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return bad_request(e)
|
return bad_request()
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
start_date = datetime.date(payload['startDate']['year'],payload['startDate']['month'],payload['startDate']['day'])
|
start_date = datetime.date(payload['startDate']['year'],payload['startDate']['month'],payload['startDate']['day'])
|
||||||
|
|
|
@ -24,6 +24,7 @@ class User(db.Model):
|
||||||
'seToken' : self.seToken,
|
'seToken' : self.seToken,
|
||||||
'avatar_url' : self.avatar_url,
|
'avatar_url' : self.avatar_url,
|
||||||
'isFirstLogin' : self.isFirstLogin,
|
'isFirstLogin' : self.isFirstLogin,
|
||||||
|
'campusName': self.campusName,
|
||||||
'campuses_id_list': self.campuses_id_list,
|
'campuses_id_list': self.campuses_id_list,
|
||||||
'classes_id_list': self.classes_id_list
|
'classes_id_list': self.classes_id_list
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue