1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Merge pull request #426 from m0sth8/fix-milestone-assignee

Take params for milestone and assignee from query instead of path args
This commit is contained in:
无闻 2014-09-03 09:02:47 -04:00
commit 097f1b5759
2 changed files with 3 additions and 3 deletions

View File

@ -870,7 +870,7 @@ function initIssue() {
$.post($m.data("ajax"), { $.post($m.data("ajax"), {
issue: $('#issue').data("id"), issue: $('#issue').data("id"),
milestone: id milestoneid: id
}, function (json) { }, function (json) {
if (json.ok) { if (json.ok) {
//window.location.reload(); //window.location.reload();

View File

@ -582,7 +582,7 @@ func UpdateIssueMilestone(ctx *middleware.Context) {
} }
oldMid := issue.MilestoneId oldMid := issue.MilestoneId
mid := com.StrTo(ctx.Params(":milestone")).MustInt64() mid := com.StrTo(ctx.Query("milestoneid")).MustInt64()
if oldMid == mid { if oldMid == mid {
ctx.JSON(200, map[string]interface{}{ ctx.JSON(200, map[string]interface{}{
"ok": true, "ok": true,
@ -627,7 +627,7 @@ func UpdateAssignee(ctx *middleware.Context) {
return 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. // Not check for invalid assignne id and give responsibility to owners.
issue.AssigneeId = aid issue.AssigneeId = aid
if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil { if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil {