@home.route('/check_metadata/<filename>', methods=['GET', 'POST'])
@login_required
def check_metadata(filename: str):
    current_document = user_data.get_active_document()
    if (not current_document):
        raise FileNotFoundError
    eml_node = load_eml(filename=current_document)
    content = check_eml(eml_node, filename)
    if (request.method == 'POST'):
        return redirect(url_for(PAGE_CHECK, filename=current_document))
    else:
        set_current_page('check_metadata')
        return render_template('check_metadata.html', content=content, title='Check Metadata')
@home.route('/check_metadata/<filename>', methods=['GET', 'POST'])
@login_required
def check_metadata(filename: str):
    current_document = user_data.get_active_document()
    if (not current_document):
        raise FileNotFoundError
    eml_node = load_eml(filename=current_document)
    content = check_eml(eml_node, filename)
    if (request.method == 'POST'):
        return redirect(url_for(PAGE_CHECK, filename=current_document))
    else:
        set_current_page('check_metadata')
        return render_template('check_metadata.html', content=content, title='Check Metadata')