mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-10 10:12:55 +00:00
feat: Add GetInstance endpoint (#9452)
This commit is contained in:
@@ -2,6 +2,7 @@ package object
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
@@ -176,3 +177,22 @@ func MFAStateToPb(state domain.MFAState) user_pb.AuthFactorState {
|
||||
return user_pb.AuthFactorState_AUTH_FACTOR_STATE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func ToViewDetailsPb(
|
||||
sequence uint64,
|
||||
creationDate,
|
||||
changeDate time.Time,
|
||||
resourceOwner string,
|
||||
) *object.Details {
|
||||
details := &object.Details{
|
||||
Sequence: sequence,
|
||||
ResourceOwner: resourceOwner,
|
||||
}
|
||||
if !creationDate.IsZero() {
|
||||
details.CreationDate = timestamppb.New(creationDate)
|
||||
}
|
||||
if !changeDate.IsZero() {
|
||||
details.ChangeDate = timestamppb.New(changeDate)
|
||||
}
|
||||
return details
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user