refactor: split backend transport and domain modules
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"kra/internal/server/handler"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func RegisterOrganization(group *gin.RouterGroup, h *handler.Organization) {
|
||||
departments := group.Group("/department")
|
||||
departments.POST("/getDepartmentList", h.ListDepartments)
|
||||
departments.POST("/createDepartment", h.CreateDepartment)
|
||||
departments.PUT("/updateDepartment", h.UpdateDepartment)
|
||||
departments.DELETE("/deleteDepartment", h.DeleteDepartment)
|
||||
departments.GET("/findDepartment", h.FindDepartment)
|
||||
departments.GET("/getDepartmentUsers", h.DepartmentUsers)
|
||||
departments.POST("/setDepartmentUsers", h.SetDepartmentUsers)
|
||||
group.POST("/user/setUserDepartments", h.SetUserDepartments)
|
||||
|
||||
positions := group.Group("/position")
|
||||
positions.POST("/getPositionList", h.ListPositions)
|
||||
positions.POST("/createPosition", h.CreatePosition)
|
||||
positions.PUT("/updatePosition", h.UpdatePosition)
|
||||
positions.DELETE("/deletePosition", h.DeletePosition)
|
||||
positions.GET("/findPosition", h.FindPosition)
|
||||
positions.GET("/getPositionUsers", h.PositionUsers)
|
||||
positions.POST("/setPositionUsers", h.SetPositionUsers)
|
||||
group.POST("/user/setUserPositions", h.SetUserPositions)
|
||||
}
|
||||
Reference in New Issue
Block a user