mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-30 01:35:32 +00:00 
			
		
		
		
	Suche nach Musenalm-ID implementiert
This commit is contained in:
		| @@ -1,12 +1,26 @@ | ||||
| package dbmodels | ||||
|  | ||||
| import ( | ||||
| 	"strconv" | ||||
|  | ||||
| 	"github.com/pocketbase/dbx" | ||||
| 	"github.com/pocketbase/pocketbase/core" | ||||
| ) | ||||
|  | ||||
| type EntriesAgents map[string][]*REntriesAgents | ||||
|  | ||||
| func EntriesForID(app core.App, query int) ([]*Entry, error) { | ||||
| 	entries := []*Entry{} | ||||
| 	err := app.RecordQuery(ENTRIES_TABLE). | ||||
| 		Where(dbx.HashExp{MUSENALMID_FIELD: strconv.Itoa(query)}). | ||||
| 		All(&entries) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	return entries, nil | ||||
| } | ||||
|  | ||||
| func YearsForEntries(app core.App) ([]int, error) { | ||||
| 	rec := []core.Record{} | ||||
| 	err := app.RecordQuery(ENTRIES_TABLE). | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens