Skip to content

Commit

Permalink
fix(instance-metadata): add required CreatedAt field
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Aug 27, 2024
1 parent f5eb54c commit 6c7a656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/entity/server_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkg/versia/instance_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down

0 comments on commit 6c7a656

Please sign in to comment.