diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-29 10:24:42 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-29 10:24:42 -0400 |
commit | ffa59739b609ce00ce21344531f27d4003dfc688 (patch) | |
tree | 726c38beca110de0ce8b226ce2e7f7a8e19917de /routers/repo | |
parent | 2c073afbec4b9845e8ddd10a4d3f469874fdcd37 (diff) | |
download | gitea-ffa59739b609ce00ce21344531f27d4003dfc688.tar.gz gitea-ffa59739b609ce00ce21344531f27d4003dfc688.zip |
Add edit issue
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index c89c8b5685..b38967f717 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -152,7 +152,7 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { return } issue.Poster = u - issue.Content = string(base.RenderMarkdown([]byte(issue.Content), "")) + issue.RenderedContent = string(base.RenderMarkdown([]byte(issue.Content), "")) // Get comments. comments, err := models.GetIssueComments(issue.Id) @@ -216,8 +216,12 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat return } - ctx.Data["Title"] = issue.Name - ctx.Data["Issue"] = issue + ctx.JSON(200, map[string]interface{}{ + "ok": true, + "title": issue.Name, + "content": string(base.RenderMarkdown([]byte(issue.Content), "")), + "raw_content": issue.Content, + }) } func Comment(ctx *middleware.Context, params martini.Params) { |