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

Method AddChanel

controllers/AdminControllers/DocController.go:119–129  ·  view source on GitHub ↗

新增文库频道

()

Source from the content-addressed store, hash-verified

117
118//新增文库频道
119func (this *DocController) AddChanel() {
120 var cate models.Category
121 this.ParseForm(&cate)
122 if len(cate.Title) > 0 && len(cate.Alias) > 0 {
123 cate.Status = true
124 orm.NewOrm().Insert(&cate)
125 this.ResponseJson(true, "频道新增成功")
126 } else {
127 this.ResponseJson(false, "名称和别名均不能为空")
128 }
129}
130
131//根据频道获取下一级分类
132func (this *DocController) GetCateByCid() {

Callers

nothing calls this directly

Calls 3

ParseFormMethod · 0.80
InsertMethod · 0.80
ResponseJsonMethod · 0.45

Tested by

no test coverage detected