mirror of
1
Fork 0

start work on federationinfo

This commit is contained in:
Michael Jerger 2024-01-12 14:35:43 +01:00
parent 8610d94af8
commit c67be3b668
1 changed files with 1 additions and 5 deletions

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
}