fixed tests

part1, one test still failing
This commit is contained in:
Clemens 2024-03-28 09:36:08 +01:00
parent d624ebb712
commit 1ad7bdf983
11 changed files with 43 additions and 24 deletions

View file

@ -82,7 +82,7 @@ func LikeActivity(ctx context.Context, form any, repositoryID int64) (int, strin
// execute the activity if the repo was not stared already
alreadyStared := repo.IsStaring(ctx, user.ID, repositoryID)
if !alreadyStared {
err = repo.StarRepo(ctx, user, repositoryID, true)
err = repo.StarRepo(ctx, *user, repositoryID, true)
if err != nil {
return http.StatusNotAcceptable, "Error staring", err
}

View file

@ -62,7 +62,7 @@ func ValidateOneOf(value any, allowed []any) []string {
return []string{}
}
}
return []string{fmt.Sprintf("Value %v is not contained in allowed values [%v]", value, allowed)}
return []string{fmt.Sprintf("Value %v is not contained in allowed values %v", value, allowed)}
}
func ValidateSuffix(str, suffix string) bool {