mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
add some todos
This commit is contained in:
parent
48c6d62e47
commit
0453598e3d
2 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,8 @@ import (
|
||||||
// FederationInfo data type
|
// FederationInfo data type
|
||||||
// swagger:model
|
// swagger:model
|
||||||
type FederationInfo struct {
|
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"`
|
HostFqdn string `xorm:"host_fqdn UNIQUE INDEX VARCHAR(255) NOT NULL"`
|
||||||
NodeInfo NodeInfo `xorm:"extends NOT NULL"`
|
NodeInfo NodeInfo `xorm:"extends NOT NULL"`
|
||||||
LatestActivity time.Time `xorm:"NOT NULL"`
|
LatestActivity time.Time `xorm:"NOT NULL"`
|
||||||
|
|
|
@ -31,6 +31,7 @@ func GetFederationInfo(ctx context.Context, ID int64) (*FederationInfo, error) {
|
||||||
|
|
||||||
func FindFederationInfoByHostFqdn(ctx context.Context, fqdn string) (*FederationInfo, error) {
|
func FindFederationInfoByHostFqdn(ctx context.Context, fqdn string) (*FederationInfo, error) {
|
||||||
info := new(FederationInfo)
|
info := new(FederationInfo)
|
||||||
|
// TODO: use parameter with toLower
|
||||||
has, err := db.GetEngine(ctx).Where("host_fqdn=?", fqdn).Get(info)
|
has, err := db.GetEngine(ctx).Where("host_fqdn=?", fqdn).Get(info)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue