Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 01:44:24 +01:00

Use Plural

This commit is contained in:
erik 2024-03-25 16:52:39 +01:00
parent 653ced5596
commit 6d814447d0
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ func init() {
db.RegisterModel(new(FederatedRepo))
}
func FindFederatedRepoByRepoID(ctx context.Context, repoId int64) ([]*FederatedRepo, error) {
func FindFederatedReposByRepoID(ctx context.Context, repoId int64) ([]*FederatedRepo, error) {
maxFederatedRepos := 10
sess := db.GetEngine(ctx).Where("repo_id=?", repoId)
sess = sess.Limit(maxFederatedRepos, 0)

View file

@ -380,7 +380,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
ctx.Data["HasAccess"] = true
ctx.Data["Permission"] = &ctx.Repo.Permission
federatedRepo, err := repo_model.FindFederatedRepoByRepoID(ctx, repo.ID)
federatedRepo, err := repo_model.FindFederatedReposByRepoID(ctx, repo.ID)
if err == nil {
// TODO: concat string to semicolon sperated list here
ctx.Data["FederatedRepos"] = federatedRepo