 
   def render_feature_list(req, state) do
     req = :cowboy_req.set_resp_header("content-type", "application/json; charset=utf-8", req)
-    {:ok, features} = Yodado.FeaturePersistence.all()
+    {:ok, features} = Yodado.FeaturePersistence.all(state.c)
     body = features |> Enum.map(&Yodado.Feature.json/1) |> JSEX.encode!(indent: 2)
     {body, req, state}
   end

    {:ok, true} = features_json |> 
                JSEX.decode!(labels: :atom) |> 
                Enum.map(&Yodado.Feature.from_json/1) |>
                Yodado.FeaturePersistence.sync
    {true, req, state}
  end
end

  end

  def service_available(req, state) do
    persistence_ok = Yodado.FeaturePersistence.ping(state.c)
    {persistence_ok, req, state}
  end

