diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-15 17:54:43 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-15 17:54:43 -0600 |
| commit | b7ff80b7be532f4bb64c1daf8cef3462f9938362 (patch) | |
| tree | 3d88661d72339be3fc81425b6d4397bcc8e8c603 /app/controllers/dashboard/controller.go | |
| parent | 655fb6c4cc180dfcbc13c1b85e0fbf47019caec0 (diff) | |
feat: connect a blank dashboard controller
Diffstat (limited to 'app/controllers/dashboard/controller.go')
| -rw-r--r-- | app/controllers/dashboard/controller.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/dashboard/controller.go b/app/controllers/dashboard/controller.go new file mode 100644 index 0000000..060dbfa --- /dev/null +++ b/app/controllers/dashboard/controller.go @@ -0,0 +1,18 @@ +package dashboard + +import "net/http" + +type Controller struct { +} + +func New() *Controller { + return &Controller{} +} + +func (c *Controller) MountTo(mux *http.ServeMux) { + mux.HandleFunc("GET /dashboard", c.Show) +} + +func (c *Controller) Show(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "/", http.StatusFound) +} |
