MCPcopy Index your code
hub / github.com/TruthHun/DocHub / DocDel

Method DocDel

controllers/HomeControllers/UserController.go:608–626  ·  view source on GitHub ↗

删除文档

()

Source from the content-addressed store, hash-verified

606
607//删除文档
608func (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//文档编辑
629func (this *UserController) DocEdit() {

Callers

nothing calls this directly

Calls 2

RemoveToRecycleMethod · 0.80
ResponseJsonMethod · 0.45

Tested by

no test coverage detected