feat: add components management functionality

This commit is contained in:
Tran Anh Tuan
2026-05-11 10:35:38 +07:00
parent 50564e9b78
commit bf20286f04
15 changed files with 1662 additions and 1 deletions

View File

@@ -82,6 +82,15 @@ func NewRouter() *gin.Engine {
componentType.PUT("/:id", utils.AsyncHandler(services.ComponentTypeUpdate))
componentType.DELETE("/:id", utils.AsyncHandler(services.ComponentTypeDelete))
}
component := v1.Group(constants.API_GROUP_COMPONENT)
{
component.GET("", utils.AsyncHandler(services.ComponentList))
component.GET("/:id", utils.AsyncHandler(services.ComponentGetByID))
component.POST("", utils.AsyncHandler(services.ComponentCreate))
component.PUT("/:id", utils.AsyncHandler(services.ComponentUpdate))
component.DELETE("/:id", utils.AsyncHandler(services.ComponentDelete))
}
}
r.GET(constants.API_PATH_PING, services.PingHandler)