mirror of
https://github.com/adulau/pdns-qof-server.git
synced 2024-12-22 08:45:57 +00:00
Return Numbers in JSON
This commit is contained in:
parent
31b8677dd5
commit
e17e3a2bdb
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ def getFirstSeen(t1 = None, t2 = None):
|
|||
rec = "s:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getLastSeen(t1 = None, t2 = None):
|
||||
if t1 is None or t2 is None:
|
||||
|
@ -41,7 +41,7 @@ def getLastSeen(t1 = None, t2 = None):
|
|||
rec = "l:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getCount(t1 = None, t2 = None):
|
||||
if t1 is None or t2 is None:
|
||||
|
@ -49,7 +49,7 @@ def getCount(t1 = None, t2 = None):
|
|||
rec = "o:"+t1.lower()+":"+t2.lower()
|
||||
recget = r.get(rec)
|
||||
if recget is not None:
|
||||
return recget.decode(encoding='UTF-8')
|
||||
return int(recget.decode(encoding='UTF-8'))
|
||||
|
||||
def getRecord(t = None):
|
||||
if t is None:
|
||||
|
|
Loading…
Reference in a new issue