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
+2 -2
View File
@@ -1,6 +1,6 @@
monitor-site
.idea.md
pb_data
data
temp
.vscode
.vscode
beszel
+1 -1
View File
@@ -44,7 +44,7 @@ func main() {
// })
// 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")
if err != nil {
return err