From 2648484a1de4443fdb748edb144c90c4a7a37472 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 21 Dec 2019 05:48:48 +0000 Subject: Add about page --- service/transport.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'service/transport.go') diff --git a/service/transport.go b/service/transport.go index 6759fcc..2b75662 100644 --- a/service/transport.go +++ b/service/transport.go @@ -228,6 +228,16 @@ func NewHandler(s Service, staticDir string) http.Handler { w.WriteHeader(http.StatusFound) }).Methods(http.MethodPost) + r.HandleFunc("/about", func(w http.ResponseWriter, req *http.Request) { + ctx := getContextWithSession(context.Background(), req) + + err := s.ServeAboutPage(ctx, w, nil) + if err != nil { + s.ServeErrorPage(ctx, w, err) + return + } + }).Methods(http.MethodGet) + r.HandleFunc("/signout", func(w http.ResponseWriter, req *http.Request) { // TODO remove session from database w.Header().Add("Set-Cookie", fmt.Sprintf("session_id=;max-age=0")) -- cgit v1.2.3