code: func restDeleteProfileByName(w http.ResponseWriter, r *http.Request) {
  	vars := mux.Vars(r)
  	n, err := url.QueryUnescape(vars[NAME])
  	if err != nil {
  		LoggingClient.Error(err.Error())
  		http.Error(w, err.Error(), http.StatusBadRequest)
  		return
  	}
  
  	// Check if the device profile exists
  	dp, err := dbClient.GetDeviceProfileByName(n)
  	if err != nil {
  		if err == db.ErrNotFound {
  			http.Error(w, err.Error(), http.StatusNotFound)
  		} else {
  			http.Error(w, err.Error(), http.StatusInternalServerError)
  		}
  		LoggingClient.Error(err.Error())
  		return
  	}
  
  	// Delete the device profile
  	if err = deleteDeviceProfile(dp, w); err != nil {
  		LoggingClient.Error(err.Error())
  		return
  	}
  	w.Header().Set("Content-Type", "application/json")
  	w.WriteHeader(http.StatusOK)
  	w.Write([]byte("true"))
  }
docs: // Delete the device profile based on its name