fix: converters (#1413)

* fix: converters

* fix: converters

* comments
This commit is contained in:
Livio Amstutz
2021-03-12 14:06:05 +01:00
committed by GitHub
parent af55c4a65c
commit e9eb5b7848
27 changed files with 149 additions and 58 deletions

View File

@@ -26,10 +26,11 @@ func KeyViewToPb(key *key_model.AuthNKeyView) *authn.Key {
Id: key.ID,
Type: authn.KeyType_KEY_TYPE_JSON,
ExpirationDate: expDate,
Details: object.ToDetailsPb(
Details: object.ToViewDetailsPb(
key.Sequence,
key.CreationDate, //TODO: details
"key.ResourceOwner", //TODO: details
key.CreationDate,
key.CreationDate,
"", //TODO: details
),
}
}
@@ -42,10 +43,11 @@ func KeyToPb(key *key_model.AuthNKeyView) *authn.Key {
Id: key.ID,
Type: KeyTypeToPb(key.Type),
ExpirationDate: expDate,
Details: object.ToDetailsPb(
Details: object.ToViewDetailsPb(
key.Sequence,
key.CreationDate, //TODO: not very pretty
"key.ResourceOwner", //TODO: details
key.CreationDate,
key.CreationDate,
"", //TODO: details
),
}
}