Commit 9ae97d6d authored by ale's avatar ale

use the parsed request.json data directly

parent 9a58b282
......@@ -26,14 +26,9 @@ def before_request():
@app.route('/submit')
def receive():
try:
data = json.load(request.data)
except:
abort(400)
p = g.redis.pipeline(transaction=False)
#per_user = {}
for user, results in data.iteritems():
for user, results in request.json.iteritems():
key = 'virus:%s' % user
#p.ltrim(key, 0, 0)
for r in results:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment