From 08cc2a6adeb591c687d68c22bac9bc5b5f9f62b6 Mon Sep 17 00:00:00 2001 From: r Date: Sun, 22 Dec 2019 18:10:42 +0000 Subject: Add emojis 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 e3ec113..437d32f 100644 --- a/service/transport.go +++ b/service/transport.go @@ -241,6 +241,16 @@ func NewHandler(s Service, staticDir string) http.Handler { } }).Methods(http.MethodGet) + r.HandleFunc("/emojis", func(w http.ResponseWriter, req *http.Request) { + ctx := getContextWithSession(context.Background(), req) + + err := s.ServeEmojiPage(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