Propertytypegroups-Tree
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
# password=<databaseUserPassword> dbname=<databaseName>
|
||||
|
||||
[database]
|
||||
##connection_string = "host=192.168.178.50 port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable"
|
||||
connection_string = "host=localhost port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable"
|
||||
connection_string = "host=192.168.178.50 port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable"
|
||||
##connection_string = "host=localhost port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable"
|
||||
driver_name = "postgres"
|
||||
|
||||
################################################################
|
||||
|
||||
@@ -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