Refactored single almanach view

This commit is contained in:
Simon Martens
2025-02-25 22:13:02 +01:00
parent 4d65b71563
commit 0a9e71d4e3
11 changed files with 321 additions and 171 deletions

View File

@@ -2,6 +2,14 @@ package dbmodels
import "github.com/pocketbase/pocketbase/core"
func Ids[T core.RecordProxy](records []T) []any {
ids := []any{}
for _, r := range records {
ids = append(ids, r.ProxyRecord().Id)
}
return ids
}
func SetBasicPublicRules(collection *core.Collection) {
collection.ViewRule = PUBLIC_VIEW_RULE
collection.ListRule = PUBLIC_LIST_RULE