Added an option to specify demo user, will be created on startup if it does not exist

This commit is contained in:
2026-03-02 15:28:00 +01:00
parent 660c44992e
commit 78c777170b
6 changed files with 17 additions and 7 deletions

View File

@@ -11,5 +11,6 @@ func GetAppInfo(ac appcontext.AppContext) {
ac.C.JSON(http.StatusOK, dto.AppInfo{
RegistrationDisabled: ac.Config.DisableRegistration,
DemoMode: ac.Config.DemoMode,
DemoUsername: ac.Config.DemoUsername,
})
}

View File

@@ -34,7 +34,7 @@ func PostLoginHandler(ac appcontext.AppContext) {
}
username = user.Username
} else {
username = "demo"
username = ac.Config.DemoUsername
}
var jwtToken string