summaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.py')
-rwxr-xr-xsrc/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.py b/src/main.py
index 783698e..609433b 100755
--- a/src/main.py
+++ b/src/main.py
@@ -62,6 +62,8 @@ def get_pubkey():
def get_data(key=None, limit=25, skip=0, ip=None,
port=None, asn=None, domain=None):
+ if key:
+ return db.get(key)
selectors = dict()
indexes = CouchIindex().dict()
@@ -130,6 +132,8 @@ async def get_key(key=None, Authorize: AuthJWT = Depends()):
Authorize.jwt_required()
+ # TODO: Use JWT authz and check e.g. domain here
+
data = get_data(key)
return JSONResponse(content={"status": "success", "docs": data})