From d1ff7ba2fb19eb99d5778ed4570f68d763e2006b Mon Sep 17 00:00:00 2001 From: adibwp Date: Thu, 13 Jun 2024 15:16:46 +0700 Subject: [PATCH] fix routing --- handlers/corporate/dashboardpic.handlers.go | 2 +- handlers/routes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/corporate/dashboardpic.handlers.go b/handlers/corporate/dashboardpic.handlers.go index 5333418..4dc0319 100644 --- a/handlers/corporate/dashboardpic.handlers.go +++ b/handlers/corporate/dashboardpic.handlers.go @@ -186,7 +186,7 @@ func (ea *DashboardPicHandler) HandleToDetail(c echo.Context) error { logger.Info("params", zap.Any("id", id)) - url := "/dev/detail/" + id + url := "/corp/dashboard_pic/detail/" + id c.Response().Header().Set("HX-Redirect", url) return c.String(http.StatusOK, url) diff --git a/handlers/routes.go b/handlers/routes.go index 9c7538d..400590e 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -113,7 +113,7 @@ func SetupRoutesCorporate(app *echo.Echo, appStore db.AppStore) { // mcu detail mcudServ := corporate_services.NewMcuDetailServices(appStore) mcudHandr := corporate_handlers.NewMcuDetailHandler(mcudServ) - corp.GET("/detail/:id", mcudHandr.HandlerShowMcuDetailScreen) + corp.GET("/dashboard_pic/detail/:id", mcudHandr.HandlerShowMcuDetailScreen) patientHandler := corporate_handlers.NewPatientHandler(l) corp.GET("/patient", patientHandler.ShowPatient)