fix login api
This commit is contained in:
3
core/apps/accounts/cache/user.py
vendored
3
core/apps/accounts/cache/user.py
vendored
@@ -8,12 +8,11 @@ r = redis.StrictRedis.from_url(env.str('REDIS_URL'))
|
||||
|
||||
|
||||
def cache_user_credentials(phone_number, password, time):
|
||||
hashed_password = make_password(password)
|
||||
key = f"user_credentials:{phone_number}"
|
||||
|
||||
r.hmset(key, {
|
||||
"phone": phone_number,
|
||||
"password": hashed_password
|
||||
"password": password
|
||||
})
|
||||
|
||||
r.expire(key, time)
|
||||
|
||||
Reference in New Issue
Block a user