fix authentication transaction; record created identities (#10)

This commit is contained in:
Michael Quigley
2022-07-29 15:54:13 -04:00
parent cb1a88e339
commit 1292c5d702
3 changed files with 21 additions and 2 deletions

View File

@ -18,6 +18,7 @@ func ZrokAuthenticate(token string) (*rest_model_zrok.Principal, error) {
if err != nil {
return nil, err
}
defer func() { _ = tx.Rollback() }()
if a, err := str.FindAccountWithToken(token, tx); err == nil {
principal := rest_model_zrok.Principal{
ID: int64(a.Id),