Propertytypegroups-Tree

This commit is contained in:
2026-09-15 19:27:04 +02:00
parent 33acfb0bfc
commit dcb6295091
12 changed files with 220 additions and 20 deletions
@@ -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)