Browse Source

add interface to get doc infos by doc ids (#1950)

### What problem does this PR solve?
### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
tags/v0.10.0
Kevin Hu 1 year ago
parent
commit
eedec157a7
No account linked to committer's email address
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      api/apps/document_app.py

+ 8
- 0
api/apps/document_app.py View File

@@ -203,6 +203,14 @@ def list_docs():
return server_error_response(e)


@manager.route('/infos', methods=['POST'])
def docinfos():
req = request.json
doc_ids = req["doc_ids"]
docs = DocumentService.get_by_ids(doc_ids)
return get_json_result(data=list(docs.dicts()))


@manager.route('/thumbnails', methods=['GET'])
@login_required
def thumbnails():

Loading…
Cancel
Save