added / implemented group API

This commit is contained in:
Tobias Kurze
2019-04-10 15:11:21 +02:00
parent f0783d97c8
commit 2451a56403
5 changed files with 85 additions and 31 deletions

View File

@@ -434,6 +434,14 @@ class Group(db.Model):
"""
return Group.query.filter(Group.name == name).first()
@staticmethod
def get_all():
"""
Return all groups
:return:
"""
return Group.query.all()
def __str__(self):
return self.name