mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-15 05:58:16 +00:00
start work on federationinfo
This commit is contained in:
parent
8610d94af8
commit
c67be3b668
|
@ -24,12 +24,8 @@ func (info FederationInfo) Validate() []string {
|
|||
var result []string
|
||||
result = append(result, validation.ValidateNotEmpty(string(info.HostFqdn), "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, info.NodeInfo.Validate()...)
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue