feat: add component_types management functionality

This commit is contained in:
Tran Anh Tuan
2026-05-11 10:15:02 +07:00
parent 7c9a0d4670
commit 50564e9b78
14 changed files with 1468 additions and 1 deletions

View File

@@ -73,6 +73,15 @@ func NewRouter() *gin.Engine {
container.PUT("/:id", utils.AsyncHandler(services.ContainerUpdate))
container.DELETE("/:id", utils.AsyncHandler(services.ContainerDelete))
}
componentType := v1.Group(constants.API_GROUP_COMPONENT_TYPE)
{
componentType.GET("", utils.AsyncHandler(services.ComponentTypeList))
componentType.GET("/:id", utils.AsyncHandler(services.ComponentTypeGetByID))
componentType.POST("", utils.AsyncHandler(services.ComponentTypeCreate))
componentType.PUT("/:id", utils.AsyncHandler(services.ComponentTypeUpdate))
componentType.DELETE("/:id", utils.AsyncHandler(services.ComponentTypeDelete))
}
}
r.GET(constants.API_PATH_PING, services.PingHandler)