@@ -24,7 +24,7 @@ import (
24
24
// GetContentHistoryOverview get overview
25
25
func GetContentHistoryOverview (ctx * context.Context ) {
26
26
issue := GetActionIssue (ctx )
27
- if issue == nil {
27
+ if ctx . Written () {
28
28
return
29
29
}
30
30
@@ -43,11 +43,11 @@ func GetContentHistoryOverview(ctx *context.Context) {
43
43
// GetContentHistoryList get list
44
44
func GetContentHistoryList (ctx * context.Context ) {
45
45
issue := GetActionIssue (ctx )
46
- commentID := ctx .FormInt64 ("comment_id" )
47
- if issue == nil {
46
+ if ctx .Written () {
48
47
return
49
48
}
50
49
50
+ commentID := ctx .FormInt64 ("comment_id" )
51
51
items , _ := issues_model .FetchIssueContentHistoryList (ctx , issue .ID , commentID )
52
52
53
53
// render history list to HTML for frontend dropdown items: (name, value)
@@ -113,7 +113,7 @@ func canSoftDeleteContentHistory(ctx *context.Context, issue *issues_model.Issue
113
113
// GetContentHistoryDetail get detail
114
114
func GetContentHistoryDetail (ctx * context.Context ) {
115
115
issue := GetActionIssue (ctx )
116
- if issue == nil {
116
+ if ctx . Written () {
117
117
return
118
118
}
119
119
@@ -179,7 +179,7 @@ func GetContentHistoryDetail(ctx *context.Context) {
179
179
// SoftDeleteContentHistory soft delete
180
180
func SoftDeleteContentHistory (ctx * context.Context ) {
181
181
issue := GetActionIssue (ctx )
182
- if issue == nil {
182
+ if ctx . Written () {
183
183
return
184
184
}
185
185
0 commit comments