fixed issues, store now works

This commit is contained in:
Michael Jerger 2024-03-23 17:01:25 +01:00
parent ce317c33cb
commit a9d18e5327
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ func CreateFederatedRepo(ctx context.Context, repo *FederatedRepo) error {
func UpdateFederatedRepo(ctx context.Context, localRepoId int64, federatedRepoList []*FederatedRepo) error {
for _, federatedRepo := range federatedRepoList {
if res, err := validation.IsValid(federatedRepo); !res {
if res, err := validation.IsValid(*federatedRepo); !res {
return fmt.Errorf("FederationInfo is not valid: %v", err)
}
}

View file

@ -213,7 +213,7 @@ func CreateUserFromAP(ctx context.Context, personID forgefed.PersonID, federatio
// Create or update a list of FederatedRepo structs
func UpdateFederatedRepoList(ctx context.Context, localRepoId int64, federatedRepoList []string) (int, string, error) {
federatedRepos := make([]*repo.FederatedRepo, len(federatedRepoList))
federatedRepos := make([]*repo.FederatedRepo, 0, len(federatedRepoList))
for _, uri := range federatedRepoList {
federationHost, err := GetFederationHostForUri(ctx, uri)
if err != nil {