mirror of https://github.com/langgenius/dify.git
Fix flask response: 200 -> {}, 200 (#25404)
This commit is contained in:
parent
e180c19cca
commit
4aba570fa8
|
|
@ -249,7 +249,7 @@ class DataSourceNotionDatasetSyncApi(Resource):
|
|||
documents = DocumentService.get_document_by_dataset_id(dataset_id_str)
|
||||
for document in documents:
|
||||
document_indexing_sync_task.delay(dataset_id_str, document.id)
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
class DataSourceNotionDocumentSyncApi(Resource):
|
||||
|
|
@ -267,7 +267,7 @@ class DataSourceNotionDocumentSyncApi(Resource):
|
|||
if document is None:
|
||||
raise NotFound("Document not found.")
|
||||
document_indexing_sync_task.delay(dataset_id_str, document_id_str)
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
api.add_resource(DataSourceApi, "/data-source/integrates", "/data-source/integrates/<uuid:binding_id>/<string:action>")
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class DatasetMetadataBuiltInFieldActionApi(Resource):
|
|||
MetadataService.enable_built_in_field(dataset)
|
||||
elif action == "disable":
|
||||
MetadataService.disable_built_in_field(dataset)
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
class DocumentMetadataEditApi(Resource):
|
||||
|
|
@ -135,7 +135,7 @@ class DocumentMetadataEditApi(Resource):
|
|||
|
||||
MetadataService.update_documents_metadata(dataset, metadata_args)
|
||||
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
api.add_resource(DatasetMetadataCreateApi, "/datasets/<uuid:dataset_id>/metadata")
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class TagBindingCreateApi(Resource):
|
|||
args = parser.parse_args()
|
||||
TagService.save_tag_binding(args)
|
||||
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
class TagBindingDeleteApi(Resource):
|
||||
|
|
@ -132,7 +132,7 @@ class TagBindingDeleteApi(Resource):
|
|||
args = parser.parse_args()
|
||||
TagService.delete_tag_binding(args)
|
||||
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
api.add_resource(TagListApi, "/tags")
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class DatasetMetadataBuiltInFieldActionServiceApi(DatasetApiResource):
|
|||
MetadataService.enable_built_in_field(dataset)
|
||||
elif action == "disable":
|
||||
MetadataService.disable_built_in_field(dataset)
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
||||
|
||||
@service_api_ns.route("/datasets/<uuid:dataset_id>/documents/metadata")
|
||||
|
|
@ -204,4 +204,4 @@ class DocumentMetadataEditServiceApi(DatasetApiResource):
|
|||
|
||||
MetadataService.update_documents_metadata(dataset, metadata_args)
|
||||
|
||||
return 200
|
||||
return {"result": "success"}, 200
|
||||
|
|
|
|||
Loading…
Reference in New Issue