This commit is contained in:
2025-12-07 14:54:35 +01:00
parent ac6a4fd6d3
commit d18a72d492
18 changed files with 725 additions and 307 deletions
+7 -9
View File
@@ -5,15 +5,13 @@ import (
"teletype_softwares/lib/http_utils"
)
func StartHttpServer(domain domain.Domain) {
router := Router{
SoftwareController: &SoftwareController{softwareService: domain.SoftwareService},
SoftwareUpdaterController: &SoftwareUpdaterController{
softwareUpdaterService: domain.SoftwareUpdaterService,
},
DownloadController: &DownloadController{downloadService: domain.DownloadService},
PlayController: &PlayController{},
}.Init()
func StartHttpServer(domainInstance domain.Domain) {
router := NewRouter(
NewSoftwareController(domainInstance.SoftwareService),
NewSoftwareUpdaterController(domainInstance.SoftwareUpdaterService),
NewDownloadController(domainInstance.DownloadService),
NewPlayController(),
).Init()
http_utils.StartGenericHTTPServer(http_utils.StartGenericHTTPServerContext{
Router: router,