summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/controller.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-15 17:54:43 -0600
committermo khan <mo@mokhan.ca>2025-04-15 17:54:43 -0600
commitb7ff80b7be532f4bb64c1daf8cef3462f9938362 (patch)
tree3d88661d72339be3fc81425b6d4397bcc8e8c603 /app/controllers/dashboard/controller.go
parent655fb6c4cc180dfcbc13c1b85e0fbf47019caec0 (diff)
feat: connect a blank dashboard controller
Diffstat (limited to 'app/controllers/dashboard/controller.go')
-rw-r--r--app/controllers/dashboard/controller.go18
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)
+}