Parcourir la 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 il y a 1 an
Parent
révision
eedec157a7
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8
    0
      api/apps/document_app.py

+ 8
- 0
api/apps/document_app.py Voir le fichier

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

Chargement…
Annuler
Enregistrer