删除文档
()
| 606 | |
| 607 | //删除文档 |
| 608 | func (this *UserController) DocDel() { |
| 609 | |
| 610 | if this.IsLogin == 0 { |
| 611 | this.ResponseJson(false, "请先登录") |
| 612 | } |
| 613 | |
| 614 | docid, _ := this.GetInt(":doc") |
| 615 | if docid == 0 { |
| 616 | this.ResponseJson(false, "删除失败,文档不存在") |
| 617 | } |
| 618 | |
| 619 | err := models.NewDocumentRecycle().RemoveToRecycle(this.IsLogin, true, docid) |
| 620 | if err != nil { |
| 621 | helper.Logger.Error("删除失败:%v", err.Error()) |
| 622 | this.ResponseJson(false, "删除失败,文档不存在") |
| 623 | } |
| 624 | |
| 625 | this.ResponseJson(true, "删除成功") |
| 626 | } |
| 627 | |
| 628 | //文档编辑 |
| 629 | func (this *UserController) DocEdit() { |
nothing calls this directly
no test coverage detected