get rid of old list route and function

This commit is contained in:
Derek McQuay 2017-02-04 23:37:29 -08:00
parent c73a3bf707
commit 712b4a1cff
No known key found for this signature in database
GPG Key ID: 92A7BC0C86B0B91A

View File

@ -179,33 +179,7 @@ func (s *Server) fakeSetup(w http.ResponseWriter, r *http.Request) {
// } // }
// } // }
//} //}
//
//func (s *Server) listUsers(w http.ResponseWriter, r *http.Request) {
// //TODO add back in oauth
// //w.Header().Set("Content-Type", "application/json")
// //session, err := store.Get(r, "creds")
// //if err != nil {
// // http.Error(w, err.Error(), http.StatusInternalServerError)
// // return
// //}
// //if loggedIn := session.Values["authenticated"]; loggedIn != true {
// // http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
// // return
// //}
// switch r.Method {
// default:
// b, _ := json.Marshal(NewFailure("Allowed method: GET"))
// http.Error(w, string(b), http.StatusBadRequest)
// return
// case "GET":
// err := json.NewEncoder(w).Encode(users)
// if err != nil {
// http.Error(w, err.Error(), http.StatusInternalServerError)
// return
// }
// }
//}
//
func (s *Server) login(w http.ResponseWriter, r *http.Request) { func (s *Server) login(w http.ResponseWriter, r *http.Request) {
session, _ := store.Get(r, "creds") session, _ := store.Get(r, "creds")
if loggedIn := session.Values["authenticated"]; loggedIn == true { if loggedIn := session.Values["authenticated"]; loggedIn == true {