diff --git a/models/forgefed/federationinfo.go b/models/forgefed/federationinfo.go index 90b65dab67..e85a005dfb 100644 --- a/models/forgefed/federationinfo.go +++ b/models/forgefed/federationinfo.go @@ -14,7 +14,8 @@ import ( // FederationInfo data type // swagger:model type FederationInfo struct { - ID int64 `xorm:"pk autoincr"` + ID int64 `xorm:"pk autoincr"` + // TODO: implement a toLower here & add a toLowerValidation HostFqdn string `xorm:"host_fqdn UNIQUE INDEX VARCHAR(255) NOT NULL"` NodeInfo NodeInfo `xorm:"extends NOT NULL"` LatestActivity time.Time `xorm:"NOT NULL"` diff --git a/models/forgefed/federationinfo_repository.go b/models/forgefed/federationinfo_repository.go index 50796a8d50..6db92c2981 100644 --- a/models/forgefed/federationinfo_repository.go +++ b/models/forgefed/federationinfo_repository.go @@ -31,6 +31,7 @@ func GetFederationInfo(ctx context.Context, ID int64) (*FederationInfo, error) { func FindFederationInfoByHostFqdn(ctx context.Context, fqdn string) (*FederationInfo, error) { info := new(FederationInfo) + // TODO: use parameter with toLower has, err := db.GetEngine(ctx).Where("host_fqdn=?", fqdn).Get(info) if err != nil { return nil, err