mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 20:49:04 +08:00
added documentation for api and fixed: duplicate get_dataset() (#1190)
### What problem does this PR solve? Added the documentation for api and fixed duplicate get_dataset() methods. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [x] Documentation Update
This commit is contained in:
parent
6be3626372
commit
d9a9be4b4c
@ -82,8 +82,8 @@ def create_dataset():
|
|||||||
# In case that the length of the name exceeds the limit
|
# In case that the length of the name exceeds the limit
|
||||||
dataset_name_length = len(dataset_name)
|
dataset_name_length = len(dataset_name)
|
||||||
if dataset_name_length > NAME_LENGTH_LIMIT:
|
if dataset_name_length > NAME_LENGTH_LIMIT:
|
||||||
return construct_json_result(
|
return construct_json_result(code=RetCode.DATA_ERROR,
|
||||||
message=f"Dataset name: {dataset_name} with length {dataset_name_length} exceeds {NAME_LENGTH_LIMIT}!")
|
message=f"Dataset name: {dataset_name} with length {dataset_name_length} exceeds {NAME_LENGTH_LIMIT}!")
|
||||||
|
|
||||||
# In case that there are other fields in the data-binary
|
# In case that there are other fields in the data-binary
|
||||||
if len(request_body.keys()) > 1:
|
if len(request_body.keys()) > 1:
|
||||||
@ -177,11 +177,6 @@ def get_dataset():
|
|||||||
return construct_json_result(e)
|
return construct_json_result(e)
|
||||||
|
|
||||||
# ------------------------------ update a dataset --------------------------------------------
|
# ------------------------------ update a dataset --------------------------------------------
|
||||||
@manager.route('/<dataset_id>', methods=['GET'])
|
|
||||||
@login_required
|
|
||||||
def get_dataset(dataset_id):
|
|
||||||
return construct_json_result(code=RetCode.DATA_ERROR, message=f"attempt to get detail of dataset: {dataset_id}")
|
|
||||||
|
|
||||||
@manager.route('/<dataset_id>', methods=['PUT'])
|
@manager.route('/<dataset_id>', methods=['PUT'])
|
||||||
@login_required
|
@login_required
|
||||||
@validate_request("name")
|
@validate_request("name")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user