Basic implementation for get secret endpoint
This commit is contained in:
parent
9f46c5cd21
commit
db37d04c1d
1 changed files with 7 additions and 0 deletions
|
@ -16,3 +16,10 @@ async def set_secret(data: Secret):
|
||||||
"status": "saved",
|
"status": "saved",
|
||||||
"retrieval_url": f"/secret/{new_key}",
|
"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