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)
This commit is contained in:
Kevin Hu 2024-08-15 09:34:24 +08:00 committed by GitHub
parent c6c3961250
commit eedec157a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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():