diff options
Diffstat (limited to 'service/transport.go')
-rw-r--r-- | service/transport.go | 10 |
1 files changed, 10 insertions, 0 deletions
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")) |