mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 11:18:52 +03:00
Also trim whitespaces within the list items
This commit is contained in:
parent
431b4c2829
commit
5edf7d0e61
1 changed files with 3 additions and 0 deletions
|
@ -209,6 +209,9 @@ func SettingsPost(ctx *context.Context) {
|
|||
if strings.TrimSpace(federationRepos) == "" {
|
||||
federationRepoSplit = []string{}
|
||||
}
|
||||
for idx, repo := range federationRepoSplit {
|
||||
federationRepoSplit[idx] = strings.TrimSpace(repo)
|
||||
}
|
||||
|
||||
if _, _, err := federation.StoreFederatedRepoList(ctx, ctx.Repo.Repository.ID, federationRepoSplit); err != nil {
|
||||
ctx.ServerError("UpdateRepository", err)
|
||||
|
|
Loading…
Reference in a new issue