File tree 2 files changed +14
-17
lines changed
2 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -2127,13 +2127,6 @@ func UpdateCommentContent(ctx *context.Context) {
2127
2127
return
2128
2128
}
2129
2129
2130
- if comment .Type == models .CommentTypeComment {
2131
- if err := comment .LoadAttachments (); err != nil {
2132
- ctx .ServerError ("LoadAttachments" , err )
2133
- return
2134
- }
2135
- }
2136
-
2137
2130
if ! ctx .IsSigned || (ctx .User .ID != comment .PosterID && ! ctx .Repo .CanWriteIssuesOrPulls (comment .Issue .IsPull )) {
2138
2131
ctx .Error (http .StatusForbidden )
2139
2132
return
@@ -2155,6 +2148,17 @@ func UpdateCommentContent(ctx *context.Context) {
2155
2148
return
2156
2149
}
2157
2150
2151
+ if ctx .FormString ("action" ) == "tasklist" {
2152
+ return
2153
+ }
2154
+
2155
+ if comment .Type == models .CommentTypeComment {
2156
+ if err := comment .LoadAttachments (); err != nil {
2157
+ ctx .ServerError ("LoadAttachments" , err )
2158
+ return
2159
+ }
2160
+ }
2161
+
2158
2162
if err := updateAttachments (comment , ctx .FormStrings ("files[]" )); err != nil {
2159
2163
ctx .ServerError ("UpdateAttachments" , err )
2160
2164
return
Original file line number Diff line number Diff line change @@ -43,20 +43,13 @@ export function initMarkupTasklist() {
43
43
44
44
try {
45
45
const editContentZone = container . querySelector ( '.edit-content-zone' ) ;
46
- const { updateUrl, context, attachmentUrl} = editContentZone . dataset ;
47
-
48
- const resp = await fetch ( attachmentUrl ) ;
49
- const attachments = await resp . json ( ) ;
50
- const files = [ ] ;
51
- for ( const attachment of attachments ) {
52
- files . push ( attachment . uuid ) ;
53
- }
46
+ const { updateUrl, context} = editContentZone . dataset ;
54
47
55
48
await $ . post ( updateUrl , {
49
+ action : 'tasklist' ,
56
50
_csrf : window . config . csrf ,
57
51
content : newContent ,
58
- context,
59
- files
52
+ context
60
53
} ) ;
61
54
62
55
rawContent . textContent = newContent ;
You can’t perform that action at this time.
0 commit comments