MCPcopy Create free account
hub / github.com/crewjam/saml / HandleDeleteUser

Method HandleDeleteUser

samlidp/user.go:102–110  ·  view source on GitHub ↗

HandleDeleteUser handles the `DELETE /users/:id` request.

(c web.C, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

100
101// HandleDeleteUser handles the `DELETE /users/:id` request.
102func (s *Server) HandleDeleteUser(c web.C, w http.ResponseWriter, r *http.Request) {
103 err := s.Store.Delete(fmt.Sprintf("/users/%s", c.URLParams["id"]))
104 if err != nil {
105 s.logger.Printf("ERROR: %s", err)
106 http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
107 return
108 }
109 w.WriteHeader(http.StatusNoContent)
110}

Callers

nothing calls this directly

Calls 3

PrintfMethod · 0.80
DeleteMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected