mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
tooltips + verwaltung finish
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/templating"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"github.com/pocketbase/pocketbase/tools/router"
|
||||
"github.com/pocketbase/pocketbase/tools/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -60,6 +61,10 @@ func (p *UserManagementAccessPage) GET(engine *templating.Engine, app core.App)
|
||||
access_token = token
|
||||
} else {
|
||||
access_token = dbmodels.NewAccessToken(record)
|
||||
access_token.SetExpires(types.NowDateTime().Add(7 * 24 * time.Hour))
|
||||
if err := app.Save(access_token); err != nil {
|
||||
return engine.Response500(e, err, nil)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: check if access token exists, if not generate
|
||||
|
||||
Reference in New Issue
Block a user