mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 06:50:25 +02:00
synced with master
This commit is contained in:
commit
a4101f7670
6 files changed
+50
-7
No files matched your search
@@ -68,6 +68,11 @@ func (api *recordApi) list(c echo.Context) error {
|
||||
searchProvider := search.NewProvider(fieldsResolver).
|
||||
Query(api.app.Dao().RecordQuery(collection))
|
||||
|
||||
// views don't have "rowid" so we fallback to "id"
|
||||
if collection.IsView() {
|
||||
searchProvider.CountCol("id")
|
||||
}
|
||||
|
||||
if requestData.Admin == nil && collection.ListRule != nil {
|
||||
searchProvider.AddFilter(search.FilterData(*collection.ListRule))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user