capabilities.go 666 B

12345678910111213141516
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "project_management/app/controller"
  5. middlewares "project_management/app/middleware"
  6. )
  7. func CapabilitiesRoutes(r *gin.Engine) {
  8. group := r.Group("/api")
  9. group.POST("/capabilitiesall", controller.GetCapabilities)
  10. group.POST("/admincapabilities", controller.AdminGetCapabilities).Use(middlewares.AdminMiddleware())
  11. group.POST("/capabilities", controller.AdminAddGetCapabilities).Use(middlewares.AdminMiddleware())
  12. group.PUT("/capabilities", controller.AdminUpdateCapabilities).Use(middlewares.AdminMiddleware())
  13. group.DELETE("/capabilities", controller.AdminDeleteCap).Use(middlewares.AdminMiddleware())
  14. }