This commit is contained in:
randogoth 2023-05-22 11:47:33 +03:00
parent 0e75bdd220
commit f06b9b5ec2

View file

@ -17,7 +17,7 @@ app = Flask(__name__)
@app.route("/track", methods = ['GET']) @app.route("/track", methods = ['GET'])
def track(): def track():
if request.method == 'GET' and request.args.get('hash'): if request.method == 'GET' and request.args.get('hash') and request.args.get('cat'):
hash = str(request.args.get('hash')) hash = str(request.args.get('hash'))
cat = str(request.args.get('cat')) cat = str(request.args.get('cat'))
@ -30,7 +30,7 @@ def track():
else: else:
db = {} db = {}
if hash in db.keys(): if hash in db.keys():
visits = db[hash]['visits'] visits = db[hash][cat]
else: else:
visits = list() visits = list()