company under development
This commit is contained in:
26
handlers/corporate/company.handlers.go
Normal file
26
handlers/corporate/company.handlers.go
Normal 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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user