@main.route('/api/post-type')
def get_original_post_type():
    page_to_check = request.args.get('url')
    mf2_parsed = mf2py.parse(page_to_check)
    if (not mf2_parsed):
        return jsonify({'status': 'failed', 'result': ''})
    if (not mf2_parsed['items']):
        return jsonify({'status': 'failed', 'result': ''})
    h_entry = [i for i in mf2_parsed['items'] if (i['type'] == ['h-entry'])]
    result = indieweb_utils.get_post_type(h_entry)
    return jsonify({'status': 'success', 'result': result})
@main.route('/api/post-type')
def get_original_post_type():
    page_to_check = request.args.get('url')
    mf2_parsed = mf2py.parse(page_to_check)
    if (not mf2_parsed):
        return jsonify({'status': 'failed', 'result': })
    if (not mf2_parsed['items']):
        return jsonify({'status': 'failed', 'result': })
    h_entry = [i for i in mf2_parsed['items'] if (i['type'] == ['h-entry'])]
    result = indieweb_utils.get_post_type(h_entry)
    return jsonify({'status': 'success', 'result': result})