hotfix: Actually using getdel function
This commit is contained in:
parent
0644d260de
commit
fc77407379
2 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ from redis.asyncio import Redis
|
|||
from pssecret_server.fernet import get_fernet
|
||||
from pssecret_server.models import Secret, SecretSaveResult
|
||||
from pssecret_server.redis_db import get_redis
|
||||
from pssecret_server.utils import decrypt_secret, encrypt_secret, save_secret
|
||||
from pssecret_server.utils import decrypt_secret, encrypt_secret, getdel, save_secret
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
@ -49,7 +49,7 @@ async def set_secret(
|
|||
async def get_secret(
|
||||
secret_key: str, redis: RedisDep, fernet: FernetDep
|
||||
) -> dict[str, bytes]:
|
||||
data: bytes | None = await redis.getdel(secret_key)
|
||||
data: bytes | None = await getdel(redis, secret_key)
|
||||
|
||||
if data is None:
|
||||
raise HTTPException(404)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "pssecret-server"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
description = "API service for secrets sharing over network"
|
||||
authors = ["Ivan Golikov <root@ivnglkv.me>"]
|
||||
license = "BSD-3-Clause"
|
||||
|
|
Loading…
Reference in a new issue