diff --git a/api/api_v1/endpoints/user.py b/api/api_v1/endpoints/user.py index eb5e4b3..18205ef 100644 --- a/api/api_v1/endpoints/user.py +++ b/api/api_v1/endpoints/user.py @@ -20,7 +20,8 @@ router = APIRouter() host = settings.REDIS_CONF.get('host') port = settings.REDIS_CONF.get('port') db = settings.REDIS_CONF.get('db') -redisdb = redis.Redis(host=host, port=port, db=db) +password = settings.REDIS_CONF.get('password') +redisdb = redis.Redis(host=host, port=port, db=db,password=password) @router.post("/send_auth_code") async def reset_password(request: Request, diff --git a/utils/dingding.py b/utils/dingding.py index ff62358..61ab7b9 100644 --- a/utils/dingding.py +++ b/utils/dingding.py @@ -26,7 +26,7 @@ db = Settings.REDIS_CONF.get('db') clientMongo = Mongo.DATABASE_URI password = Settings.REDIS_CONF.get('password') # redisdb = redis.Redis(host=host, port=port, db=db,password=password) -redisdb = redis.Redis(host=host, port=port, db=db) +redisdb = redis.Redis(host=host, port=port, db=db,password=password) myClient = pymongo.MongoClient(clientMongo) def get_msec():