File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,12 @@ func LockIssue(ctx *context.Context) {
20
20
}
21
21
22
22
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" ))
25
24
return
26
25
}
27
26
28
27
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" ))
31
29
return
32
30
}
33
31
@@ -51,8 +49,7 @@ func UnlockIssue(ctx *context.Context) {
51
49
}
52
50
53
51
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" ))
56
53
return
57
54
}
58
55
You can’t perform that action at this time.
0 commit comments