mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-05 02:55:30 +00:00
+ make IApp available in the controllers
This commit is contained in:
@@ -4,11 +4,18 @@ import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/templating"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"github.com/pocketbase/pocketbase/tools/router"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
type IPage interface {
|
||||
Up(app core.App, engine *templating.Engine) error
|
||||
Down(app core.App, engine *templating.Engine) error
|
||||
// TODO: pass the cache here
|
||||
Setup(router *router.Router[*core.RequestEvent], app core.App, engine *templating.Engine) error
|
||||
type IApp interface {
|
||||
Core() core.App
|
||||
ResetDataCache()
|
||||
ResetHtmlCache()
|
||||
Logger() *slog.Logger
|
||||
}
|
||||
|
||||
type IPage interface {
|
||||
Up(app IApp, engine *templating.Engine) error
|
||||
Down(app IApp, engine *templating.Engine) error
|
||||
Setup(router *router.Router[*core.RequestEvent], app IApp, engine *templating.Engine) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user