29 lines
939 B
Go
29 lines
939 B
Go
package controllers
|
|
|
|
import "github.com/gofiber/fiber/v2"
|
|
|
|
// DashboardController handles requests related to the dashboard.
|
|
type DashboardController struct {
|
|
// Add any dependencies here, e.g., a service to fetch dashboard data
|
|
}
|
|
|
|
// NewDashboardController creates a new instance of DashboardController.
|
|
func NewDashboardController() *DashboardController {
|
|
return &DashboardController{}
|
|
}
|
|
|
|
// ShowDashboard renders the main dashboard page.
|
|
// @Summary Show the main dashboard
|
|
// @Description Displays the main dashboard page with an overview.
|
|
// @Tags dashboard
|
|
// @Produce html
|
|
// @Success 200 {string} html "Dashboard page HTML"
|
|
// @Router / [get]
|
|
func (dc *DashboardController) ShowDashboard(c *fiber.Ctx) error {
|
|
// For now, just render the dashboard template.
|
|
// Later, you might pass data to the template.
|
|
return c.Render("pages/dashboard", fiber.Map{
|
|
"Title": "Dashboard", // This can be used in base.jet {{ .Title }}
|
|
})
|
|
}
|