added glob matching
This commit is contained in:
@@ -33,15 +33,8 @@ func setupHttpServer(
|
||||
}
|
||||
|
||||
ignoredPaths := []string{
|
||||
"/static/css/output.css",
|
||||
"/static/favicon.ico",
|
||||
"/static/js/toasts.js",
|
||||
"/static/js/copytoclipboard.js",
|
||||
"/static/js/theme.js",
|
||||
"/static/js/pagination.js",
|
||||
"/static/vendored/htmx@2.0.8.min.js",
|
||||
"/static/vendored/htmx-ext-ws.min.js",
|
||||
"/static/vendored/alpinejs@3.15.4.min.js",
|
||||
"/static/*",
|
||||
"/.well-known/*",
|
||||
"/ws/notifications",
|
||||
}
|
||||
|
||||
|
||||
34
cmd/oslstats/migrations/20260127194815_seasons.go
Normal file
34
cmd/oslstats/migrations/20260127194815_seasons.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.haelnorr.com/h/oslstats/internal/db"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Migrations.MustRegister(
|
||||
// UP migration
|
||||
func(ctx context.Context, dbConn *bun.DB) error {
|
||||
_, err := dbConn.NewCreateTable().
|
||||
Model((*db.Season)(nil)).
|
||||
Exec(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
// DOWN migration
|
||||
func(ctx context.Context, dbConn *bun.DB) error {
|
||||
_, err := dbConn.NewDropTable().
|
||||
Model((*db.Season)(nil)).
|
||||
IfExists().
|
||||
Exec(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user