You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
499 B
23 lines
499 B
package routes
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"teraclone/internal/handler"
|
|
"teraclone/internal/handlers"
|
|
"teraclone/internal/service"
|
|
)
|
|
|
|
func Register(mux *http.ServeMux, appService *service.AppService) error {
|
|
legacyHandler := handler.NewAppHandler(appService)
|
|
legacyHandler.RegisterLegacyRoutes(mux)
|
|
|
|
deviceHandler, err := handlers.NewDeviceHandler(appService)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
deviceHandler.RegisterRoutes(mux)
|
|
mux.HandleFunc("/health", legacyHandler.HandleHealth)
|
|
return nil
|
|
}
|
|
|