浏览代码

extract editor routes remove feature to type own routes

weichen 4 年之前
父节点
当前提交
723780bff7
共有 1 个文件被更改,包括 1 次插入9 次删除
  1. 1 9
      backstage/editor/routes.py

+ 1 - 9
backstage/editor/routes.py

@@ -1,5 +1,4 @@
-from flask import render_template, Blueprint, request, redirect, url_for
-import requests
+from flask import render_template, Blueprint, request
 
 editor_app = Blueprint('editor', __name__)
 
@@ -8,10 +7,3 @@ editor_app = Blueprint('editor', __name__)
 def editor():
     url = request.args.get('url', type=str)
     return render_template('editor.html', title='Type Editor', url=url)
-
-
-@editor_app.route('/backstage/remove', methods=['POST'])
-def remove():
-    url = request.args.get('url', type=str)
-    response = requests.delete('http://127.0.0.1:5000/api/contents?url={}'.format(url))
-    return redirect(url_for('collections.collection_list'))