From c8c6519551cef8b82b55e3e5866b35156c89e6b1 Mon Sep 17 00:00:00 2001 From: jc0b Date: Thu, 30 Jul 2020 21:37:44 +0200 Subject: Added authorizations endpoint for prefabs --- api/opendc/models/prefab.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api/opendc/models/prefab.py') 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) -- cgit v1.2.3