client md bahan

This commit is contained in:
sindhu
2024-05-08 16:14:07 +07:00
parent 1965359fd5
commit 88d9985ca1
7 changed files with 226 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
package client_handlers
import (
"cpone/utils"
client_mdbahan "cpone/views/client/mdbahan"
"github.com/labstack/echo/v4"
)
type MdBahanService interface {
}
func NewMdBahanHandler(us MdBahanService) *MdBahanHandler {
return &MdBahanHandler{
MdBahanService: us,
}
}
type MdBahanHandler struct {
MdBahanService MdBahanService
}
func (uh *MdBahanHandler) ShowMdBahan(c echo.Context) error {
helo := client_mdbahan.Show()
return utils.View(c, helo)
}

View File

@@ -1,9 +1,11 @@
package handlers
import (
client_handlers "cpone/handlers/client"
corporate_handlers "cpone/handlers/corporate"
dev_handlers "cpone/handlers/dev"
public_handlers "cpone/handlers/public"
client_services "cpone/services/client"
corporate_services "cpone/services/corporate"
public_services "cpone/services/public"
@@ -72,3 +74,10 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) {
lh := corporate_handlers.NewCompanyHandler(l)
public.GET("/company", lh.ShowCompany)
}
func SetupRoutesClient(app *echo.Echo, appStore db.AppStore) {
public := app.Group("/client")
l := client_services.NewServicesMdBahan(appStore)
lh := client_handlers.NewMdBahanHandler(l)
public.GET("/md/bahan", lh.ShowMdBahan)
}