+Inhalte edit page

This commit is contained in:
Simon Martens
2026-01-16 16:16:15 +01:00
parent b8dc2c952c
commit 8c96aaa88b
15 changed files with 1765 additions and 600 deletions

View File

@@ -67,3 +67,18 @@ func nextPlaceMusenalmID(app core.App) (int, error) {
}
return place.MusenalmID() + 1, nil
}
func nextContentMusenalmID(app core.App) (int, error) {
var content dbmodels.Content
err := app.RecordQuery(dbmodels.CONTENTS_TABLE).
OrderBy(dbmodels.MUSENALMID_FIELD + " DESC").
Limit(1).
One(&content)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return 1, nil
}
return 0, err
}
return content.MusenalmID() + 1, nil
}