summaryrefslogtreecommitdiff
path: root/api/opendc/models/prefab.py
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-07-30 21:37:44 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:48 +0200
commitc8c6519551cef8b82b55e3e5866b35156c89e6b1 (patch)
treeb378c112bfb1c5f08b23844fc8103ede64b3b36d /api/opendc/models/prefab.py
parent3bdfd4dafbe56872dfa00866e04780fa1d20b033 (diff)
Added authorizations endpoint for prefabs
Diffstat (limited to 'api/opendc/models/prefab.py')
-rw-r--r--api/opendc/models/prefab.py4
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)