diff --git a/internal/entity/server_metadata.go b/internal/entity/server_metadata.go index 2b17c54..4af419b 100644 --- a/internal/entity/server_metadata.go +++ b/internal/entity/server_metadata.go @@ -72,6 +72,7 @@ func NewInstanceMetadata(dbData *ent.InstanceMetadata) (*InstanceMetadata, error func (m InstanceMetadata) ToLysand() versia.InstanceMetadata { return versia.InstanceMetadata{ + CreatedAt: versiautils.TimeFromStd(m.CreatedAt), Extensions: m.Extensions, Name: m.Name, Description: m.Description, diff --git a/internal/repository/repo_impls/instance_metadata_repository_impl.go b/internal/repository/repo_impls/instance_metadata_repository_impl.go index c554025..b24defb 100644 --- a/internal/repository/repo_impls/instance_metadata_repository_impl.go +++ b/internal/repository/repo_impls/instance_metadata_repository_impl.go @@ -56,6 +56,7 @@ func (i *InstanceMetadataRepositoryImpl) ImportFromLysandByURI(ctx context.Conte defer s.End() ctx = s.Context() + // TODO: implement storing the instance metadata //i.federationService. return nil, nil diff --git a/pkg/versia/instance_metadata.go b/pkg/versia/instance_metadata.go index 7f31c8e..0ed0964 100644 --- a/pkg/versia/instance_metadata.go +++ b/pkg/versia/instance_metadata.go @@ -15,6 +15,9 @@ type InstanceMetadata struct { // Type is always "InstanceMetadata" Type string `json:"type"` + // CreatedAt is the initial date when the instance was first created + CreatedAt versiautils.Time `json:"created_at"` + // Extensions is a map of active extensions Extensions Extensions `json:"extensions,omitempty"`