mirror of
https://github.com/adulau/hashlookup-server.git
synced 2024-11-21 09:37:09 +00:00
fix: [api] fix ttl missing bug
This commit is contained in:
parent
ab1b74e109
commit
27aa7c4034
1 changed files with 3 additions and 0 deletions
|
@ -104,6 +104,9 @@ class lookup(Resource):
|
|||
if not is_hex(sha1):
|
||||
return {'message': 'SHA-1 is not in hex format'}, 400
|
||||
k = sha1.upper()
|
||||
ttl = False
|
||||
if session:
|
||||
ttl = get_session()
|
||||
if not rdb.exists("h:{}".format(k)):
|
||||
if stats:
|
||||
rdb.zincrby("s:nx:sha1", score, k)
|
||||
|
|
Loading…
Reference in a new issue