Skip to content

Commit 6f22001

Browse files
committed
API uses query-args for parameters
1 parent 3741173 commit 6f22001

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

models/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ func IsErrPullRequestAlreadyExists(err error) bool {
603603
// Error does pretty-printing :D
604604
func (err ErrPullRequestAlreadyExists) Error() string {
605605
return fmt.Sprintf("pull request already exists for these targets [id: %d, issue_id: %d, head_repo_id: %d, base_repo_id: %d, head_branch: %s, base_branch: %s]",
606-
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBarcnh, err.BaseBranch)
606+
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBranch, err.BaseBranch)
607607
}
608608

609609
// _________ __

routers/api/v1/repo/pull.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ import (
1818

1919
// ListPullRequests returns a list of all PRs
2020
func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) {
21-
/*prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
21+
prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
2222
Page: ctx.QueryInt("page"),
2323
State: ctx.QueryTrim("state"),
2424
SortType: ctx.QueryTrim("sort"),
2525
Labels: ctx.QueryStrings("labels"),
2626
MilestoneID: ctx.QueryInt64("milestone"),
27-
})*/
27+
})
2828

29-
prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
29+
/*prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
3030
Page: form.Page,
3131
State: form.State,
32-
})
32+
})*/
3333
if err != nil {
3434
ctx.Error(500, "PullRequests", err)
3535
return

0 commit comments

Comments
 (0)