Merge pull request 'Basic implementation for get secret endpoint' (#4) from get-secret-endpoint into main
This commit is contained in:
commit
d2babe2567
1 changed files with 7 additions and 0 deletions
|
@ -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),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue