mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
[BREAKING CHANGE] GET to POST: enhance kb list capability (#7205)
### What problem does this PR solve? Enhance capability of `list_kbs`. Breaking change: change method from `GET` to `POST`. ### Type of change - [x] Refactoring - [x] Enhancement with breaking change
This commit is contained in:
@ -150,6 +150,7 @@ class KnowledgebaseService(CommonService):
|
||||
cls.model.name,
|
||||
cls.model.language,
|
||||
cls.model.description,
|
||||
cls.model.tenant_id,
|
||||
cls.model.permission,
|
||||
cls.model.doc_num,
|
||||
cls.model.token_num,
|
||||
@ -184,7 +185,8 @@ class KnowledgebaseService(CommonService):
|
||||
|
||||
count = kbs.count()
|
||||
|
||||
kbs = kbs.paginate(page_number, items_per_page)
|
||||
if page_number and items_per_page:
|
||||
kbs = kbs.paginate(page_number, items_per_page)
|
||||
|
||||
return list(kbs.dicts()), count
|
||||
|
||||
|
||||
Reference in New Issue
Block a user