@cases_bp.route('<STR_LIT>', methods=['<STR_LIT:POST>'])<EOL>def matchmaker_delete(institute_id, case_name):
<EOL>user_obj = store.user(current_user.email)<EOL>if '<STR_LIT>' not in user_obj['<STR_LIT>']:<EOL><INDENT>flash('<STR_LIT>', '<STR_LIT>')<EOL>return redirect(request.referrer)<EOL><DEDENT>institute_obj, case_obj = institute_and_case(store, institute_id, case_name)<EOL>mme_base_url = current_app.config.get('<STR_LIT>')<EOL>mme_token = current_app.config.get('<STR_LIT>')<EOL>if not mme_base_url or not mme_token:<EOL><INDENT>flash('<STR_LIT>', '<STR_LIT>')<EOL>return redirect(request.referrer)<EOL><DEDENT>delete_result = controllers.mme_delete(case_obj, mme_base_url, mme_token)<EOL>n_deleted = <NUM_LIT:0><EOL>category = '<STR_LIT>'<EOL>for resp in delete_result:<EOL><INDENT>if resp['<STR_LIT>'] == <NUM_LIT:200>:<EOL><INDENT>n_deleted += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>flash(resp['<STR_LIT:message>'], category)<EOL><DEDENT><DEDENT>if n_deleted:<EOL><INDENT>category = '<STR_LIT:success>'<EOL>user_obj = store.user(current_user.email)<EOL>store.case_mme_delete(case_obj=case_obj, user_obj=user_obj)<EOL><DEDENT>flash('<STR_LIT>'.format(n_deleted, len(delete_result)), category)<EOL>return redirect(request.referrer)<EOL>
Remove a case from MatchMaker