fix(auth): optimise user sessions (#7199)

* fix(auth): start optimise user sessions

* reduce and query user sessions directly without gorm statements

* cleanup

* cleanup

* fix requested changes

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Silvan
2024-01-30 16:17:54 +01:00
committed by GitHub
parent c20204d84d
commit aa407c3c3e
8 changed files with 292 additions and 437 deletions

View File

@@ -244,7 +244,8 @@ func agentIDFromSession(event eventstore.Event) (string, error) {
logging.WithError(err).Error("could not unmarshal event data")
return "", zerrors.ThrowInternal(nil, "MODEL-sd325", "could not unmarshal data")
}
return session["userAgentID"].(string), nil
agentID, _ := session["userAgentID"].(string)
return agentID, nil
}
func applicationFromSession(event eventstore.Event) (*project_es_model.Application, error) {