@app.route('/api/v1/acts/upvote', methods=['POST'])
def upvote():
    global count_requests
    count_requests += 1
    if (request.method == 'POST'):
        act_id = int(json.loads(request.data)[0])
        data_id = pd.read_csv(GLOBAL_LIST)
        if (act_id not in data_id['act_id'].tolist()):
            return Response('[]', status=400, mimetype='application/json')
        category = data_id[(data_id['act_id'] == act_id)]['category'].iloc[0]
        temp_path = ((((DB + '/') + category) + '/') + GLOBAL_LIST)
        data = pd.read_csv(temp_path)
        data.set_index('actId', inplace=True)
        data.at[(act_id, 'upvotes')] += 1
        data.reset_index(inplace=True)
        data.to_csv(temp_path, index=False)
        return Response('{}', status=200, mimetype='application/json')
    else:
        return Response('{}', status=405, mimetype='application/json')
@app.route('/api/v1/acts/upvote', methods=['POST'])
def upvote():
    global count_requests
    count_requests += 1
    if (request.method == 'POST'):
        act_id = int(json.loads(request.data)[0])
        data_id = pd.read_csv(GLOBAL_LIST)
        if (act_id not in data_id['act_id'].tolist()):
            return Response('[]', status=400, mimetype='application/json')
        category = data_id[(data_id['act_id'] == act_id)]['category'].iloc[0]
        temp_path = ((((DB + '/') + category) + '/') + GLOBAL_LIST)
        data = pd.read_csv(temp_path)
        data.set_index('actId', inplace=True)
        data.at[(act_id, 'upvotes')] += 1
        data.reset_index(inplace=True)
        data.to_csv(temp_path, index=False)
        return Response('{}', status=200, mimetype='application/json')
    else:
        return Response('{}', status=405, mimetype='application/json')