mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
start work on federationinfo
This commit is contained in:
parent
8610d94af8
commit
c67be3b668
1 changed files with 1 additions and 5 deletions
|
@ -24,12 +24,8 @@ func (info FederationInfo) Validate() []string {
|
||||||
var result []string
|
var result []string
|
||||||
result = append(result, validation.ValidateNotEmpty(string(info.HostFqdn), "HostFqdn")...)
|
result = append(result, validation.ValidateNotEmpty(string(info.HostFqdn), "HostFqdn")...)
|
||||||
result = append(result, validation.ValidateMaxLen(string(info.HostFqdn), 255, "HostFqdn")...)
|
result = append(result, validation.ValidateMaxLen(string(info.HostFqdn), 255, "HostFqdn")...)
|
||||||
if (info.NodeInfo == NodeInfo{}) {
|
|
||||||
result = append(result, "Field NodeInfo may not be empty")
|
|
||||||
} else {
|
|
||||||
result = append(result, info.NodeInfo.Validate()...)
|
|
||||||
}
|
|
||||||
result = append(result, validation.ValidateNotEmpty(info.LatestActivity, "LatestActivity")...)
|
result = append(result, validation.ValidateNotEmpty(info.LatestActivity, "LatestActivity")...)
|
||||||
|
result = append(result, info.NodeInfo.Validate()...)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue