feat: golem15.feedback plugin with the widget config route
- plugin golem15.feedback (requires golem15.user), its config, lang (en, pl), models and migrations
- typed settings singleton golem15_feedback_settings with the WinterCMS defaults and a widget key generated on first creation
- GET /_feedback/api/v1/{key}/config behind the constant-time key check and the fail-closed Origin allow-list, with the feedback-config and feedback-submit buckets
This commit is contained in:
16
models/registry.go
Normal file
16
models/registry.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Package models holds the golem15.feedback GORM models. It is a leaf
|
||||
// package: it imports no other package of the plugin.
|
||||
package models
|
||||
|
||||
var all []any
|
||||
|
||||
// Register appends GORM models, so a model file adds itself without
|
||||
// editing plugin.go.
|
||||
func Register(models ...any) {
|
||||
all = append(all, models...)
|
||||
}
|
||||
|
||||
// All returns every model registered by this package.
|
||||
func All() []any {
|
||||
return all
|
||||
}
|
||||
Reference in New Issue
Block a user