generate pie chart templ

This commit is contained in:
sindhu
2024-04-30 13:51:19 +07:00
parent 976753fc8e
commit ae59d63940
12 changed files with 723 additions and 8 deletions

View File

@@ -27,6 +27,10 @@ func main() {
return c.Redirect(http.StatusMovedPermanently, "/landing_page/")
})
app.GET("/pie_chart", func(c echo.Context) error {
return c.Redirect(http.StatusMovedPermanently, "/pie_chart/")
})
uStore, err := db.NewUserStore(dbName)
if err != nil {
app.Logger.Fatalf("failed to create store: %s", err)
@@ -54,6 +58,15 @@ func main() {
lphs := handlers.NewLandingPageHandler(lps)
handlers.SetupRoutesLandingPage(app, lphs)
LpchartStore, err := db.NewPieChartStore(dbName)
if err != nil {
app.Logger.Fatalf("failed to create store: %s", err)
}
lpchart := services.NewServicesPiechart(services.Piechart{}, LpchartStore)
lphsx := handlers.NewPiechartHandler(lpchart)
handlers.SetupRoutesPieChart(app, lphsx)
app.Logger.Fatal(app.Start(":5000"))
}