Compare commits

..

2 Commits

Author SHA1 Message Date
max
a6be73765a Add GET verb to static handler 2024-02-14 13:16:52 -06:00
max
ddc9e51831 Fix boolean column migration example 2024-02-14 13:16:15 -06:00
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ func RunAllMigrations(app *app.App) error {
Id: 1, Id: 1,
UserId: 1, UserId: 1,
AuthToken: "migrate", AuthToken: "migrate",
RememberMe: false, RememberMe: true, // Booleans must be true to migrate properly
CreatedAt: time.Now(), CreatedAt: time.Now(),
} }
err = database.Migrate(app, session) err = database.Migrate(app, session)

View File

@ -22,7 +22,7 @@ func Get(app *app.App) {
return return
} }
staticHandler := http.FileServer(http.FS(staticFS)) staticHandler := http.FileServer(http.FS(staticFS))
http.Handle("/static/", http.StripPrefix("/static/", staticHandler)) http.Handle("GET /static/", http.StripPrefix("/static/", staticHandler))
slog.Info("serving static files from embedded file system /static") slog.Info("serving static files from embedded file system /static")
// Pages // Pages