def delete_one(): id = request.json.get('id') data = Img.delete_one(id=id) if data is None: r = Res.success() else: r = Res.fail() return make_response(jsonify(r))
def delete(): form = request.json data = Img.delete_one(id=form.get('id')) print('delete form', data is None) if data is None: r = Res.success() else: r = Res.fail(msg='图片删除失败') return make_response(jsonify(r))