(c *context.Context)
| 719 | } |
| 720 | |
| 721 | func UpdateIssueContent(c *context.Context) { |
| 722 | issue := getActionIssue(c) |
| 723 | if c.Written() { |
| 724 | return |
| 725 | } |
| 726 | |
| 727 | if !c.IsLogged || (c.User.ID != issue.PosterID && !c.Repo.IsWriter()) { |
| 728 | c.Status(http.StatusForbidden) |
| 729 | return |
| 730 | } |
| 731 | |
| 732 | content := c.Query("content") |
| 733 | if err := issue.ChangeContent(c.User, content); err != nil { |
| 734 | c.Error(err, "change content") |
| 735 | return |
| 736 | } |
| 737 | |
| 738 | c.JSONSuccess(map[string]string{ |
| 739 | "content": string(markup.Markdown(issue.Content, c.Query("context"), c.Repo.Repository.ComposeMetas())), |
| 740 | }) |
| 741 | } |
| 742 | |
| 743 | func UpdateIssueLabel(c *context.Context) { |
| 744 | issue := getActionIssue(c) |
nothing calls this directly
no test coverage detected