This commit is contained in:
2026-05-26 13:21:32 +08:00
parent 9cc3722634
commit 65fa606233
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -117,7 +117,14 @@ async def get_skill_info(state: AltersDep, skillId: str, level: int, redis: Redi
@router.get('/dnfhelper/{uid}/list')
async def get_dnfhelper_list(uid: str, redis: RedisDep):
result = await get_user_list_by_id(uid)
cache_key = f'dnfhelper:{uid}'
def get_list():
import asyncio
return asyncio.run(get_user_list_by_id(uid))
result = get_redis_info(redis, cache_key, get_list, expire=12 * 60 * 60)
return response(data=result)
# return response(code=500, message='Failed to fetch DNFHelper list', data=None)