Commit 8efaa339261b07da0e1d4b9f37f3b0d40f0339b6
Remove duplicate route /info
Duplicate route /info and corresponding method would not let the server run.
Removed them.
| | | | 432 | return "empty" | 432 | return "empty" |
---|
433 | | 433 | |
---|
434 | | 434 | |
---|
435 | @app.route('/info', methods=['GET']) | | @app.route('/info', methods=['GET']) |
---|
436 | def serve_info(): | | def serve_info(): |
---|
437 | coll = g.db['post'] | | coll = g.db['post'] |
---|
438 | d = {} | | d = {} |
---|
439 | cntr = 0 | | cntr = 0 |
---|
440 | for i in coll.find({"about":unquote_plus(request.args['about']),"lang":request.args['lang']}): | | for i in coll.find({"about":unquote_plus(request.args['about']),"lang":request.args['lang']}): |
---|
441 | i['_id'] = str(i['_id']) | | i['_id'] = str(i['_id']) |
---|
442 | d[cntr] = i | | d[cntr] = i |
---|
443 | cntr+=1 | | cntr+=1 |
---|
444 | response = jsonify(d) | | response = jsonify(d) |
---|
445 | response.headers['Access-Control-Allow-Origin'] = '*' | | response.headers['Access-Control-Allow-Origin'] = '*' |
---|
446 | return response | | return response |
---|
447 | | | |
---|
448 | | 435 | |
---|
449 | import logging,os | 436 | import logging,os |
---|
450 | from logging import FileHandler | 437 | from logging import FileHandler |
---|