diff options
| author | jc0b <j@jc0b.computer> | 2020-07-30 21:37:44 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:48 +0200 |
| commit | c8c6519551cef8b82b55e3e5866b35156c89e6b1 (patch) | |
| tree | b378c112bfb1c5f08b23844fc8103ede64b3b36d /api/opendc/models/prefab.py | |
| parent | 3bdfd4dafbe56872dfa00866e04780fa1d20b033 (diff) | |
Added authorizations endpoint for prefabs
Diffstat (limited to 'api/opendc/models/prefab.py')
| -rw-r--r-- | api/opendc/models/prefab.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/opendc/models/prefab.py b/api/opendc/models/prefab.py index edf1d4c4..2d20208c 100644 --- a/api/opendc/models/prefab.py +++ b/api/opendc/models/prefab.py @@ -1,5 +1,6 @@ from opendc.models.model import Model from opendc.models.user import User +from opendc.util.database import DB from opendc.util.exceptions import ClientError from opendc.util.rest import Response @@ -26,3 +27,6 @@ class Prefab(Model): #except KeyError: # OpenDC-authored objects don't necessarily have an authorId # return + + def get_all(): + return DB.fetch_all({}, Prefab.collection_name) |
