diff options
-rwxr-xr-x | src/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.py b/src/main.py index fef4050..ad8aada 100755 --- a/src/main.py +++ b/src/main.py @@ -156,7 +156,10 @@ async def add(data: Request, Authorize: AuthJWT = Depends()): @app.delete('/sc/v0/delete/{key}') -async def delete(key): +async def delete(key, Authorize: AuthJWT = Depends()): + + Authorize.jwt_required() + if db.delete(key) is None: return JSONResponse(content={"status": "error", "message": "Document not found"}, |