1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-15 18:56:59 +00:00

symetric handling for value/reference

This commit is contained in:
Michael Jerger 2024-02-08 15:16:37 +01:00
parent d2d5e84977
commit e733809ef2
2 changed files with 25 additions and 31 deletions

View file

@ -44,7 +44,7 @@ func FindFederationHostByFqdn(ctx context.Context, fqdn string) (*FederationHost
return host, nil
}
func CreateFederationHost(ctx context.Context, host FederationHost) error {
func CreateFederationHost(ctx context.Context, host *FederationHost) error {
if res, err := validation.IsValid(host); !res {
return fmt.Errorf("FederationInfo is not valid: %v", err)
}
@ -52,7 +52,7 @@ func CreateFederationHost(ctx context.Context, host FederationHost) error {
return err
}
func UpdateFederationHost(ctx context.Context, host FederationHost) error {
func UpdateFederationHost(ctx context.Context, host *FederationHost) error {
if res, err := validation.IsValid(host); !res {
return fmt.Errorf("FederationInfo is not valid: %v", err)
}