Propertytypegroups-Tree
This commit is contained in:
@@ -38,9 +38,11 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer {
|
||||
|
||||
// service initialisation:
|
||||
importService := services.NewImportService(importRepository)
|
||||
propertyTypesService := services.NewPropertyTypeService(propertyTypeRepository, propertyTypeGroupRepository)
|
||||
|
||||
// handler initialisation:
|
||||
importHandler := handlers.NewImportHandler(importService)
|
||||
propertyTypesHandler := handlers.NewPropertyTypesHandler(propertyTypesService)
|
||||
|
||||
// Service API
|
||||
router := gin.Default()
|
||||
@@ -50,6 +52,10 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer {
|
||||
router.Static("/static", "../static")
|
||||
router.GET("/", handlers.Home)
|
||||
router.GET("/properties", handlers.PropertiesHandler)
|
||||
|
||||
// properties
|
||||
router.GET("/properties/rootnodes", propertyTypesHandler.GetRootPropertyTypesGroups)
|
||||
|
||||
/*
|
||||
router.GET("/products", handlers.ProductsHandler)
|
||||
router.GET("/conditions", handlers.ConditionsHandler)
|
||||
|
||||
Reference in New Issue
Block a user