added 'id' key in JSON response
This commit is contained in:
parent
e9e10bd980
commit
346d5b4aaa
6 changed files with 11 additions and 5 deletions
|
@ -14,7 +14,8 @@ class Campus(db.Model):
|
||||||
data = {'title': self.title,
|
data = {'title': self.title,
|
||||||
'email_ending': self.email_ending,
|
'email_ending': self.email_ending,
|
||||||
'master_user_id': self.master_user_id,
|
'master_user_id': self.master_user_id,
|
||||||
'avatar_url': self.avatar_url
|
'avatar_url': self.avatar_url,
|
||||||
|
'id' : self.key().id()
|
||||||
}
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Course(db.Model):
|
||||||
'year': self.endDate.year,
|
'year': self.endDate.year,
|
||||||
'month': self.endDate.month,
|
'month': self.endDate.month,
|
||||||
'day': self.endDate.day,
|
'day': self.endDate.day,
|
||||||
}
|
},
|
||||||
}
|
'id' : self.key().id()
|
||||||
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
|
@ -18,6 +18,7 @@ class Message(db.Model):
|
||||||
'day': self.msgDate.day,
|
'day': self.msgDate.day,
|
||||||
'hour': self.msgDate.hour,
|
'hour': self.msgDate.hour,
|
||||||
'minute': self.msgDate.minute
|
'minute': self.msgDate.minute
|
||||||
}
|
},
|
||||||
|
'id' : self.key().id()
|
||||||
}
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
|
@ -20,5 +20,6 @@ class Project(db.Model):
|
||||||
'logo_url' : self.logo_url,
|
'logo_url' : self.logo_url,
|
||||||
'gitRepository' : self.gitRepository,
|
'gitRepository' : self.gitRepository,
|
||||||
'membersId' : self.membersId,
|
'membersId' : self.membersId,
|
||||||
|
'id' : self.key().id()
|
||||||
}
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
|
@ -21,6 +21,7 @@ class Task(db.Model):
|
||||||
'day': self.dueDate.day
|
'day': self.dueDate.day
|
||||||
},
|
},
|
||||||
'isPersonal' : self.isPersonal,
|
'isPersonal' : self.isPersonal,
|
||||||
|
'id' : self.key().id()
|
||||||
}
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ class TaskComponent(db.Model):
|
||||||
'type' : self.type,
|
'type' : self.type,
|
||||||
'label' : self.label,
|
'label' : self.label,
|
||||||
'isMandatory' : self.isMandatory,
|
'isMandatory' : self.isMandatory,
|
||||||
'order' : self.order
|
'order' : self.order,
|
||||||
|
'id' : self.key().id()
|
||||||
}
|
}
|
||||||
return json.dumps(data)
|
return json.dumps(data)
|
||||||
|
|
Loading…
Reference in a new issue