aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-09-03 09:02:47 -0400
committer无闻 <joe2010xtmf@163.com>2014-09-03 09:02:47 -0400
commit097f1b57593979dbfbd3ff7470992f6a6b333d5c (patch)
tree2b48b5574a752716a631dfd699cbe3a15e41ff7f
parent05a33107c98de3f0f6ba437abdfb7f3b15a64c26 (diff)
parent2a7a03e5b3ca1f24b35003082902e7dda37991bc (diff)
Merge pull request #426 from m0sth8/fix-milestone-assignee
Take params for milestone and assignee from query instead of path args
-rw-r--r--public/js/app.js2
-rw-r--r--routers/repo/issue.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/public/js/app.js b/public/js/app.js
index a5bb9569..2a7cf08b 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -870,7 +870,7 @@ function initIssue() {
$.post($m.data("ajax"), {
issue: $('#issue').data("id"),
- milestone: id
+ milestoneid: id
}, function (json) {
if (json.ok) {
//window.location.reload();
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 412d03c6..59921d55 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -582,7 +582,7 @@ func UpdateIssueMilestone(ctx *middleware.Context) {
}
oldMid := issue.MilestoneId
- mid := com.StrTo(ctx.Params(":milestone")).MustInt64()
+ mid := com.StrTo(ctx.Query("milestoneid")).MustInt64()
if oldMid == mid {
ctx.JSON(200, map[string]interface{}{
"ok": true,
@@ -627,7 +627,7 @@ func UpdateAssignee(ctx *middleware.Context) {
return
}
- aid := com.StrTo(ctx.Params(":assigneeid")).MustInt64()
+ aid := com.StrTo(ctx.Query("assigneeid")).MustInt64()
// Not check for invalid assignne id and give responsibility to owners.
issue.AssigneeId = aid
if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil {