Skip to content

Commit 2a7a03e

Browse files
committed
take params for milestone and assignee from query instead of path args
1 parent f19fc23 commit 2a7a03e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

public/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ function initIssue() {
870870

871871
$.post($m.data("ajax"), {
872872
issue: $('#issue').data("id"),
873-
milestone: id
873+
milestoneid: id
874874
}, function (json) {
875875
if (json.ok) {
876876
//window.location.reload();

routers/repo/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ func UpdateIssueMilestone(ctx *middleware.Context) {
582582
}
583583

584584
oldMid := issue.MilestoneId
585-
mid := com.StrTo(ctx.Params(":milestone")).MustInt64()
585+
mid := com.StrTo(ctx.Query("milestoneid")).MustInt64()
586586
if oldMid == mid {
587587
ctx.JSON(200, map[string]interface{}{
588588
"ok": true,
@@ -627,7 +627,7 @@ func UpdateAssignee(ctx *middleware.Context) {
627627
return
628628
}
629629

630-
aid := com.StrTo(ctx.Params(":assigneeid")).MustInt64()
630+
aid := com.StrTo(ctx.Query("assigneeid")).MustInt64()
631631
// Not check for invalid assignne id and give responsibility to owners.
632632
issue.AssigneeId = aid
633633
if err = models.UpdateIssueUserPairByAssignee(aid, issue.Id); err != nil {

0 commit comments

Comments
 (0)