func (s *Server) handleDelete(w http.ResponseWriter, r *http.Request) error {
	modulePath, version, err := parseModulePathAndVersion(r.URL.Path)
	if err != nil {
		return &serverError{http.StatusBadRequest, err}
	}
	if err := s.db.DeleteModule(r.Context(), modulePath, version); err != nil {
		return &serverError{http.StatusInternalServerError, err}
	}
	fmt.Fprintf(w, "Deleted %s@%s", modulePath, version)
	return nil
}
// handleDelete deletes the specified module version.
handleDelete deletes the specified module version.
// handleDelete deletes the specified module version .
func (s *Server) handleDelete(w http.ResponseWriter, r *http.Request) error {
	modulePath, version, err := parseModulePathAndVersion(r.URL.Path)
	if err != nil {
		return &serverError{http.StatusBadRequest, err}
	}
	if err := s.db.DeleteModule(r.Context(), modulePath, version); err != nil {
		return &serverError{http.StatusInternalServerError, err}
	}
	fmt.Fprintf(w, "Deleted %s@%s", modulePath, version)
	return nil
}
func ( s * Server ) handleDelete ( w http . ResponseWriter , r * http . Request ) error { modulePath , version , err := parseModulePathAndVersion ( r . URL . Path ) if err != nil { return & serverError { http . StatusBadRequest , err } } if err := s . db . DeleteModule ( r . Context ( ) , modulePath , version ) ; err != nil { return & serverError { http . StatusInternalServerError , err } } fmt . Fprintf ( w , " " , modulePath , version ) return nil }
handleDelete deletes the specified module version.
handleDelete deletes the specified module version .