diff --git a/lib/freedive/api/service/server.ex b/lib/freedive/api/service/server.ex index 55572fc..51a359b 100644 --- a/lib/freedive/api/service/server.ex +++ b/lib/freedive/api/service/server.ex @@ -81,8 +81,10 @@ defmodule Freedive.Api.Service do broadcast(:stdlog, %{name: name, log: std_to_log(reason)}) end - broadcast(:refreshed, service_details(name)) - + curr_service = state[:services][name] + refreshed_service = refresh_service!(curr_service) + state = %{state | services: Map.put(state[:services], name, refreshed_service)} + broadcast(:refreshed, refreshed_service) {:noreply, state} end