diff options
-rw-r--r-- | cmd/web/handlers.go | 4 | ||||
-rw-r--r-- | cmd/web/routes.go | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index bfe73dd..d4ac91c 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -58,6 +58,10 @@ func (app *application) home(w http.ResponseWriter, r *http.Request) { } } +func (app *application) organisationView(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("This is an organisation")) +} + func (app *application) organisationCreate(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost { w.Header().Set("Allow", http.MethodPost) diff --git a/cmd/web/routes.go b/cmd/web/routes.go index 7e3aabd..23ecf7b 100644 --- a/cmd/web/routes.go +++ b/cmd/web/routes.go @@ -10,5 +10,7 @@ func (app *application) routes() *http.ServeMux { mux.HandleFunc("/", app.home) mux.HandleFunc("/organisation/list", app.listOrganisation) + mux.HandleFunc("/organisation/view", app.organisationView) + mux.HandleFunc("/organisation/create", app.organisationCreate) return mux } |