// 路由注册-项目
// 秒寻科技
// zt 2024-02-03

package projectrouter

import (
	"ipsomc/core/gin/midware/endecrypt"
	"ipsomc/core/gin/midware/islogin"
	"ipsomc/module/project/projecthandler"

	"github.com/gin-gonic/gin"
)

// 配置项目路由
func SetRouter(r *gin.RouterGroup) {
	groupRouter := r.Group("/project") //路由分组
	groupHand := projecthandler.ProjectHan{}

	//请求参数解密
	groupRouter.Use(endecrypt.DecryptReqParam())

	//用户登录检查，该"行"后面的接口都需要用户登录后方可使用
	groupRouter.Use(islogin.PcIsLogin())

	groupRouter.POST("/addProject", groupHand.AddProjectHan)
	groupRouter.POST("/updateProject", groupHand.UpdateProjectHan)
	groupRouter.POST("/deleteProject", groupHand.DeleteProjectHan)
	groupRouter.POST("/getProjectById", groupHand.GetProjectByIdHan)
	groupRouter.POST("/getProjectList", groupHand.GetProjectListHan)
	groupRouter.POST("/getProjectPageList", groupHand.GetProjectPageListHan)
}
