1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

start work on federationinfo

This commit is contained in:
Michael Jerger 2024-01-12 14:35:43 +01:00
parent 8610d94af8
commit c67be3b668

View file

@ -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
}