diff --git a/backend/v3/domain/instance.go b/backend/v3/domain/instance.go index acbee10c1b..0ff5b17183 100644 --- a/backend/v3/domain/instance.go +++ b/backend/v3/domain/instance.go @@ -16,9 +16,9 @@ type Instance struct { ConsoleClientID string `json:"console_client_id,omitempty" db:"console_client_id"` ConsoleAppID string `json:"console_app_id,omitempty" db:"console_app_id"` DefaultLanguage string `json:"default_language,omitempty" db:"default_language"` - CreatedAt time.Time `json:"-,omitempty" db:"created_at"` - UpdatedAt time.Time `json:"-,omitempty" db:"updated_at"` - DeletedAt *time.Time `json:"-,omitempty" db:"deleted_at"` + CreatedAt time.Time `json:"created_at" db:"created_at"` + UpdatedAt time.Time `json:"updated_at" db:"updated_at"` + DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"` } type instanceCacheIndex uint8 diff --git a/backend/v3/storage/database/repository/instance.go b/backend/v3/storage/database/repository/instance.go index 03fc5a8149..2db72635fa 100644 --- a/backend/v3/storage/database/repository/instance.go +++ b/backend/v3/storage/database/repository/instance.go @@ -50,7 +50,7 @@ func (i *instance) List(ctx context.Context, opts ...database.Condition) ([]*dom builder.WriteString(queryInstanceStmt) - // return only non deleted isntances + // return only non deleted instances opts = append(opts, database.IsNull(i.DeletedAtColumn())) andCondition := database.And(opts...) i.writeCondition(&builder, andCondition) diff --git a/backend/v3/storage/database/repository/repository_test.go b/backend/v3/storage/database/repository/repository_test.go index 28db52365f..d7e463a604 100644 --- a/backend/v3/storage/database/repository/repository_test.go +++ b/backend/v3/storage/database/repository/repository_test.go @@ -34,20 +34,20 @@ func newEmbeededDB() (pool database.PoolTest, stop func(), err error) { var connector database.Connector connector, stop, err = embedded.StartEmbedded() if err != nil { - return nil, nil, fmt.Errorf("unable to start embedded postgres: %v", err) + return nil, nil, fmt.Errorf("unable to start embedded postgres: %w", err) } ctx := context.Background() pool_, err := connector.Connect(ctx) if err != nil { - return nil, nil, fmt.Errorf("unable to connect to embedded postgres: %v", err) + return nil, nil, fmt.Errorf("unable to connect to embedded postgres: %w", err) } pool = pool_.(database.PoolTest) err = pool.MigrateTest(ctx) if err != nil { - return nil, nil, fmt.Errorf("unable to migrate database: %v", err) + return nil, nil, fmt.Errorf("unable to migrate database: %w", err) } return pool, stop, err }