Skip to content

Commit

Permalink
add interface to get doc infos by doc ids (infiniflow#1950)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
KevinHuSh authored Aug 15, 2024
1 parent 68ef213 commit 20d69b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/apps/document_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 20d69b8

Please sign in to comment.