From 97515ecfe72a3da809f16384e9ba9a78d7112cf4 Mon Sep 17 00:00:00 2001 From: martsforever Date: Sat, 27 Sep 2025 20:29:23 +0800 Subject: [PATCH] feat: optimize code --- app/controller/add_redis_route.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/add_redis_route.py b/app/controller/add_redis_route.py index 1e8cecb..8b3ae5f 100644 --- a/app/controller/add_redis_route.py +++ b/app/controller/add_redis_route.py @@ -11,6 +11,7 @@ def add_redis_route(app: FastAPI): @app.get("/redis_get/{key}") async def redis_get(key: str, redis_client: RedisClientDep): - exists = bool(await redis_client.exists(key)) + # exists = bool(await redis_client.exists(key)) mapping = await redis_client.hgetall(key) + exists = bool(mapping) return {"result": {"exists": exists, "mapping": mapping}}