renewal-unlock: orders.renews_at lazy expiry + owner unlock notices (ntfy/sms channels, exempt from metering) — verified
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"wherewoof/frontend/internal/auth"
|
||||
"wherewoof/frontend/internal/db"
|
||||
"wherewoof/frontend/internal/notify"
|
||||
"wherewoof/frontend/internal/sms"
|
||||
"wherewoof/frontend/internal/storage"
|
||||
)
|
||||
@@ -20,15 +21,16 @@ type Templates map[string]*template.Template
|
||||
|
||||
// App holds dependencies shared by all handlers.
|
||||
type App struct {
|
||||
Queries *db.Queries
|
||||
Tpl Templates
|
||||
Sender sms.Sender
|
||||
Storage *storage.Client
|
||||
Queries *db.Queries
|
||||
Tpl Templates
|
||||
Sender sms.Sender
|
||||
Storage *storage.Client
|
||||
Notifier *notify.Notifier
|
||||
}
|
||||
|
||||
// New returns an App with the given query layer, template sets, SMS sender, and object storage.
|
||||
func New(queries *db.Queries, tpl Templates, sender sms.Sender, store *storage.Client) *App {
|
||||
return &App{Queries: queries, Tpl: tpl, Sender: sender, Storage: store}
|
||||
// New returns an App with the given dependencies.
|
||||
func New(queries *db.Queries, tpl Templates, sender sms.Sender, store *storage.Client, ntf *notify.Notifier) *App {
|
||||
return &App{Queries: queries, Tpl: tpl, Sender: sender, Storage: store, Notifier: ntf}
|
||||
}
|
||||
|
||||
// PageData is the root data passed to the base layout.
|
||||
|
||||
Reference in New Issue
Block a user