move auth setup to onbeforeserve

This commit is contained in:
Hank
2024-07-19 22:32:55 -04:00
parent 3e48e8babf
commit e876f3272f
2 changed files with 3 additions and 3 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,6 @@
monitor-site
.idea.md .idea.md
pb_data pb_data
data data
temp temp
.vscode .vscode
beszel

View File

@@ -44,7 +44,7 @@ func main() {
// }) // })
// set auth settings // set auth settings
app.OnAfterBootstrap().Add(func(e *core.BootstrapEvent) error { app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
usersCollection, err := app.Dao().FindCollectionByNameOrId("users") usersCollection, err := app.Dao().FindCollectionByNameOrId("users")
if err != nil { if err != nil {
return err return err