diff --git a/src/rectes/main.py b/src/rectes/main.py index 5e23523..6f8d0fb 100644 --- a/src/rectes/main.py +++ b/src/rectes/main.py @@ -16,3 +16,10 @@ async def set_secret(data: Secret): "status": "saved", "retrieval_url": f"/secret/{new_key}", } + + +@app.get("/secret/{secret_key}", response_model=Secret) +async def get_secret(secret_key): + return { + "data": await redis.get(secret_key), + }