删除接口逻辑
This commit is contained in:
parent
aa08acaa2d
commit
9d1bd80c82
@ -2,9 +2,9 @@ import os
|
||||
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
||||
from model import db
|
||||
from model.DanmakuClip import DanmakuClip
|
||||
from util.flask import not_found_json_response, error_json_response
|
||||
from model import db
|
||||
|
||||
blueprint = Blueprint("api_danmaku_clip", __name__, url_prefix="/api/danmaku_clip")
|
||||
|
||||
@ -52,5 +52,5 @@ def delete_video_clip(danmaku_clip_id):
|
||||
db.session.commit()
|
||||
return jsonify({
|
||||
"id": danmaku_clip_id,
|
||||
"old_data": danmaku_clip
|
||||
"old_data": danmaku_clip.to_json() if danmaku_clip is not None else {}
|
||||
})
|
||||
|
@ -2,10 +2,10 @@ import os
|
||||
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
||||
from util.flask import not_found_json_response, error_json_response
|
||||
from workflow.video import get_video_real_duration, duration_str_to_float
|
||||
from model import db
|
||||
from model.VideoClip import VideoClip
|
||||
from util.flask import not_found_json_response, error_json_response
|
||||
from workflow.video import get_video_real_duration, duration_str_to_float
|
||||
|
||||
blueprint = Blueprint("api_video_clip", __name__, url_prefix="/api/video_clip")
|
||||
|
||||
@ -56,5 +56,5 @@ def delete_video_clip(video_clip_id):
|
||||
db.session.commit()
|
||||
return jsonify({
|
||||
"id": video_clip_id,
|
||||
"old_data": video_clip
|
||||
"old_data": video_clip.to_json() if video_clip is not None else {}
|
||||
})
|
||||
|
@ -2,10 +2,10 @@ import threading
|
||||
|
||||
from flask import Blueprint, jsonify
|
||||
|
||||
from model import db
|
||||
from model.Workflow import Workflow
|
||||
from util.flask import not_found_json_response
|
||||
from workflow.worker import do_workflow
|
||||
from model import db
|
||||
|
||||
blueprint = Blueprint("api_workflow", __name__, url_prefix="/api/workflow")
|
||||
|
||||
@ -40,7 +40,7 @@ def delete_workflow(workflow_id):
|
||||
db.session.commit()
|
||||
return jsonify({
|
||||
"id": workflow_id,
|
||||
"old_data": workflow
|
||||
"old_data": workflow.to_json() if workflow is not None else {}
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user