summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/controller.go2
-rw-r--r--app/controllers/dashboard/controller_test.go4
2 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/dashboard/controller.go b/app/controllers/dashboard/controller.go
index ef5b18d..220871f 100644
--- a/app/controllers/dashboard/controller.go
+++ b/app/controllers/dashboard/controller.go
@@ -17,7 +17,7 @@ func New() *Controller {
}
func (c *Controller) MountTo(mux *http.ServeMux) {
- requireUser := middleware.RequireUser(http.StatusFound, "/")
+ requireUser := middleware.RequireUser()
mux.Handle("GET /dashboard", requireUser(http.HandlerFunc(c.Show)))
}
diff --git a/app/controllers/dashboard/controller_test.go b/app/controllers/dashboard/controller_test.go
index ced3fd5..629a03a 100644
--- a/app/controllers/dashboard/controller_test.go
+++ b/app/controllers/dashboard/controller_test.go
@@ -22,9 +22,7 @@ func TestController(t *testing.T) {
mux.ServeHTTP(w, r)
- assert.Equal(t, http.StatusFound, w.Code)
- location := w.HeaderMap.Get("Location")
- assert.Equal(t, "/", location)
+ assert.Equal(t, http.StatusNotFound, w.Code)
})
})