mirror of
https://github.com/adulau/hashlookup-server.git
synced 2024-11-22 01:57:08 +00:00
chg: [api] md5 lookup updated to allow MD5 only records
This commit is contained in:
parent
c17dbff6a6
commit
bb29fcb25c
1 changed files with 5 additions and 2 deletions
|
@ -100,6 +100,9 @@ class lookup(Resource):
|
||||||
session_key = "session:{}:exist".format(request.headers.get('hashlookup_session'))
|
session_key = "session:{}:exist".format(request.headers.get('hashlookup_session'))
|
||||||
rdb.sadd(session_key, k)
|
rdb.sadd(session_key, k)
|
||||||
rdb.expire(session_key, ttl)
|
rdb.expire(session_key, ttl)
|
||||||
|
if rdb.exist("h:{}".format(k)):
|
||||||
|
h = db.hgetall("h:{}".format(k))
|
||||||
|
else:
|
||||||
sha1 = rdb.get("l:{}".format(k))
|
sha1 = rdb.get("l:{}".format(k))
|
||||||
h = rdb.hgetall("h:{}".format(sha1))
|
h = rdb.hgetall("h:{}".format(sha1))
|
||||||
if "OpSystemCode" in h:
|
if "OpSystemCode" in h:
|
||||||
|
|
Loading…
Reference in a new issue