package ink.wgink.module.article.controller.route.content;

import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.module.article.pojo.dtos.category.CategoryDTO;
import ink.wgink.module.article.service.category.ICategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: MenuRouteController
 * @Description: 文章内容路由
 * @Author: wanggeng
 * @Date: 2021/2/10 1:43 下午
 * @Version: 1.0
 */
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "文章内容路由接口")
@Controller
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/content/data-auth")
public class ContentDataAuthRouteController {

    @GetMapping("list")
    public ModelAndView list() {
        return new ModelAndView("content/data-auth/list");
    }

    @GetMapping("list/{categoryId}")
    public ModelAndView listCategory(@PathVariable("categoryId") String categoryId) {
        ModelAndView modelAndView = new ModelAndView("content/data-auth/list-category");
        modelAndView.addObject("categoryId", categoryId);
        return modelAndView;
    }

}
