🎨 分类新增文章分类字段,优化查询接口
This commit is contained in:
@@ -196,3 +196,14 @@ func (catApi *CategoryApi) GetCategoryListPublic(context *gin.Context) {
|
||||
}
|
||||
response.OkWithData(list, context)
|
||||
}
|
||||
|
||||
// GetArticleCategoryList 获取文章类别列表
|
||||
func (catApi *CategoryApi) GetArticleCategoryList(context *gin.Context) {
|
||||
list, err := catService.GetArticleCategoryList()
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取文章类别列表失败!", zap.Error(err))
|
||||
response.FailWithMessage("获取文章类别列表失败:"+err.Error(), context)
|
||||
return
|
||||
}
|
||||
response.OkWithData(list, context)
|
||||
}
|
||||
|
Reference in New Issue
Block a user