Skip to content

Commit 901a2dc

Browse files
committed
update
1 parent 16d2650 commit 901a2dc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

routers/web/repo/issue_lock.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ func LockIssue(ctx *context.Context) {
2020
}
2121

2222
if issue.IsLocked {
23-
ctx.Flash.Error(ctx.Tr("repo.issues.lock_duplicate"))
24-
ctx.JSONRedirect(issue.Link())
23+
ctx.JSONError(ctx.Tr("repo.issues.lock_duplicate"))
2524
return
2625
}
2726

2827
if !form.HasValidReason() {
29-
ctx.Flash.Error(ctx.Tr("repo.issues.lock.unknown_reason"))
30-
ctx.JSONRedirect(issue.Link())
28+
ctx.JSONError(ctx.Tr("repo.issues.lock.unknown_reason"))
3129
return
3230
}
3331

@@ -51,8 +49,7 @@ func UnlockIssue(ctx *context.Context) {
5149
}
5250

5351
if !issue.IsLocked {
54-
ctx.Flash.Error(ctx.Tr("repo.issues.unlock_error"))
55-
ctx.JSONRedirect(issue.Link())
52+
ctx.JSONError(ctx.Tr("repo.issues.unlock_error"))
5653
return
5754
}
5855

0 commit comments

Comments
 (0)