company under development

This commit is contained in:
Sas Andy
2024-05-08 15:56:44 +07:00
parent 9ae7e495c6
commit 1965359fd5
19 changed files with 296 additions and 29 deletions

View File

@@ -0,0 +1,26 @@
package corporate_handlers
import (
"cpone/utils"
corporate_company "cpone/views/corporate/company"
"github.com/labstack/echo/v4"
)
type CompanyService interface {
}
func NewCompanyHandler(us CompanyService) *CompanyHandler {
return &CompanyHandler{
CompanyService: us,
}
}
type CompanyHandler struct {
CompanyService CompanyService
}
func (uh *CompanyHandler) ShowCompany(c echo.Context) error {
helo := corporate_company.Show()
return utils.View(c, helo)
}

View File

@@ -1,8 +1,10 @@
package handlers
import (
corporate_handlers "cpone/handlers/corporate"
dev_handlers "cpone/handlers/dev"
public_handlers "cpone/handlers/public"
corporate_services "cpone/services/corporate"
public_services "cpone/services/public"
"cpone/db"
@@ -64,3 +66,9 @@ func SetupRoutesPublic(app *echo.Echo, appStore db.AppStore) {
lh := public_handlers.NewLandingPageHandler(l)
public.GET("landingpage", lh.ShowLandingPage)
}
func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) {
public := app.Group("/corp")
l := corporate_services.NewServicesCompany(appStore)
lh := corporate_handlers.NewCompanyHandler(l)
public.GET("/company", lh.ShowCompany)
}