Merge pull request #1039 from openziti/fix.1035.null.config.types

fixes openziti/edge#1035 defaults from nil to empty slice
This commit is contained in:
Andrew
2022-06-06 16:27:52 -04:00
committed by GitHub
@@ -102,6 +102,10 @@ func MapApiSessionToRestModel(ae *env.AppEnv, apiSession *model.ApiSession) (*re
AuthenticatorID: &apiSession.AuthenticatorId,
}
if ret.ConfigTypes == nil {
ret.ConfigTypes = []string{}
}
if val, ok := ae.GetManagers().ApiSession.HeartbeatCollector.LastAccessedAt(apiSession.Id); ok {
cachedActivityAt := strfmt.DateTime(*val)
ret.CachedLastActivityAt = cachedActivityAt