HandleDeleteSession handles the `DELETE /sessions/:id` request. It invalidates the specified session.
(c web.C, w http.ResponseWriter, r *http.Request)
| 176 | // HandleDeleteSession handles the `DELETE /sessions/:id` request. It invalidates the |
| 177 | // specified session. |
| 178 | func (s *Server) HandleDeleteSession(c web.C, w http.ResponseWriter, r *http.Request) { |
| 179 | err := s.Store.Delete(fmt.Sprintf("/sessions/%s", c.URLParams["id"])) |
| 180 | if err != nil { |
| 181 | http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) |
| 182 | return |
| 183 | } |
| 184 | w.WriteHeader(http.StatusNoContent) |
| 185 | } |