新增文库频道
()
| 117 | |
| 118 | //新增文库频道 |
| 119 | func (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 | //根据频道获取下一级分类 |
| 132 | func (this *DocController) GetCateByCid() { |
nothing calls this directly
no test coverage detected