@app.route('/api/v1/categories/<category>', methods=['DELETE'])
def delete_category(category=None):
    global count_requests
    count_requests += 1
    if (request.method == 'DELETE'):
        categories = os.listdir(DB)
        if (category in categories):
            if (GLOBAL_LIST in os.listdir()):
                data = pd.read_csv(GLOBAL_LIST)
                data = data[(data.category != category)]
                data.to_csv(GLOBAL_LIST, index=False)
            shutil.rmtree(((DB + '/') + category))
            return Response('{}', status=200, mimetype='application/json')
        else:
            return Response('{}', status=400, mimetype='application/json')
    else:
        return Response('{}', status=405, mimetype='application/json')
@app.route('/api/v1/categories/<category>', methods=['DELETE'])
def delete_category(category=None):
    global count_requests
    count_requests += 1
    if (request.method == 'DELETE'):
        categories = os.listdir(DB)
        if (category in categories):
            if (GLOBAL_LIST in os.listdir()):
                data = pd.read_csv(GLOBAL_LIST)
                data = data[(data.category != category)]
                data.to_csv(GLOBAL_LIST, index=False)
            shutil.rmtree(((DB + '/') + category))
            return Response('{}', status=200, mimetype='application/json')
        else:
            return Response('{}', status=400, mimetype='application/json')
    else:
        return Response('{}', status=405, mimetype='application/json')