Kevin Hu commited on
Commit
3894d27
·
1 Parent(s): d35be0d

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

Browse files

### 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)

Files changed (1) hide show
  1. api/apps/document_app.py +8 -0
api/apps/document_app.py CHANGED
@@ -203,6 +203,14 @@ def list_docs():
203
  return server_error_response(e)
204
 
205
 
 
 
 
 
 
 
 
 
206
  @manager.route('/thumbnails', methods=['GET'])
207
  @login_required
208
  def thumbnails():
 
203
  return server_error_response(e)
204
 
205
 
206
+ @manager.route('/infos', methods=['POST'])
207
+ def docinfos():
208
+ req = request.json
209
+ doc_ids = req["doc_ids"]
210
+ docs = DocumentService.get_by_ids(doc_ids)
211
+ return get_json_result(data=list(docs.dicts()))
212
+
213
+
214
  @manager.route('/thumbnails', methods=['GET'])
215
  @login_required
216
  def thumbnails():