@@ -24,7 +24,7 @@ import (
2424// GetContentHistoryOverview get overview
2525func GetContentHistoryOverview (ctx * context.Context ) {
2626 issue := GetActionIssue (ctx )
27- if issue == nil {
27+ if ctx . Written () {
2828 return
2929 }
3030
@@ -43,11 +43,11 @@ func GetContentHistoryOverview(ctx *context.Context) {
4343// GetContentHistoryList get list
4444func GetContentHistoryList (ctx * context.Context ) {
4545 issue := GetActionIssue (ctx )
46- commentID := ctx .FormInt64 ("comment_id" )
47- if issue == nil {
46+ if ctx .Written () {
4847 return
4948 }
5049
50+ commentID := ctx .FormInt64 ("comment_id" )
5151 items , _ := issues_model .FetchIssueContentHistoryList (ctx , issue .ID , commentID )
5252
5353 // render history list to HTML for frontend dropdown items: (name, value)
@@ -113,7 +113,7 @@ func canSoftDeleteContentHistory(ctx *context.Context, issue *issues_model.Issue
113113// GetContentHistoryDetail get detail
114114func GetContentHistoryDetail (ctx * context.Context ) {
115115 issue := GetActionIssue (ctx )
116- if issue == nil {
116+ if ctx . Written () {
117117 return
118118 }
119119
@@ -179,7 +179,7 @@ func GetContentHistoryDetail(ctx *context.Context) {
179179// SoftDeleteContentHistory soft delete
180180func SoftDeleteContentHistory (ctx * context.Context ) {
181181 issue := GetActionIssue (ctx )
182- if issue == nil {
182+ if ctx . Written () {
183183 return
184184 }
185185
0 commit comments