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:
parent
d2d5e84977
commit
e733809ef2
2 changed files with 25 additions and 31 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue