소스 검색

issue: response wrong type of comment from AJAX

Unknwon 7 년 전
부모
커밋
348c75c91b
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      routers/repo/issue.go

+ 4 - 4
routers/repo/issue.go

@@ -725,8 +725,8 @@ func UpdateIssueContent(ctx *context.Context) {
 		return
 	}
 
-	ctx.JSON(200, map[string]interface{}{
-		"content": markup.Markdown(issue.Content, ctx.Query("context"), ctx.Repo.Repository.ComposeMetas()),
+	ctx.JSON(200, map[string]string{
+		"content": string(markup.Markdown(issue.Content, ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())),
 	})
 }
 
@@ -936,8 +936,8 @@ func UpdateCommentContent(ctx *context.Context) {
 		return
 	}
 
-	ctx.JSON(200, map[string]interface{}{
-		"content": markup.Markdown(comment.Content, ctx.Query("context"), ctx.Repo.Repository.ComposeMetas()),
+	ctx.JSON(200, map[string]string{
+		"content": string(markup.Markdown(comment.Content, ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())),
 	})
 }