diff options
author | 无闻 <u@gogs.io> | 2015-02-11 12:43:13 -0500 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2015-02-11 12:43:13 -0500 |
commit | e805fdb29cdf8ceabe271a5f26472ae1dc34abff (patch) | |
tree | 3f861b6ea56c70d549e2a241be677ec7b0eab04e /routers/repo/issue.go | |
parent | 6ed96b7a20b8b53ef958808cc414d59b72b7fa5c (diff) | |
parent | 03af37554e34582e8c5a9d98ec9f2d3c9884f0d8 (diff) | |
download | gitea-e805fdb29cdf8ceabe271a5f26472ae1dc34abff.tar.gz gitea-e805fdb29cdf8ceabe271a5f26472ae1dc34abff.zip |
Merge pull request #925 from phsmit/newcollaboration
Collaboration
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 3e0206dafb..bf39d9aba6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -174,7 +174,7 @@ func CreateIssue(ctx *middleware.Context) { return } - us, err := models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + us, err := ctx.Repo.Repository.GetCollaborators() if err != nil { ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err) return @@ -218,7 +218,7 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { return } - _, err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + _, err = ctx.Repo.Repository.GetCollaborators() if err != nil { send(500, nil, err) return @@ -246,8 +246,8 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { if err := models.NewIssue(issue); err != nil { send(500, nil, err) return - } else if err := models.NewIssueUserPairs(issue.RepoId, issue.Id, ctx.Repo.Owner.Id, - ctx.User.Id, form.AssigneeId, ctx.Repo.Repository.Name); err != nil { + } else if err := models.NewIssueUserPairs(ctx.Repo.Repository, issue.Id, ctx.Repo.Owner.Id, + ctx.User.Id, form.AssigneeId); err != nil { send(500, nil, err) return } @@ -384,7 +384,7 @@ func ViewIssue(ctx *middleware.Context) { } // Get all collaborators. - ctx.Data["Collaborators"], err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + ctx.Data["Collaborators"], err = ctx.Repo.Repository.GetCollaborators() if err != nil { ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err) return |