   use Core.Web, :controller
   require Logger
   import ShorterMaps
-  alias Osdi.{Attendance, Address}
+  alias Osdi.{Attendance, Address, Event, Repo}
+
+  @secret Application.get_env(:core, :update_secret)
 
   def get(conn, params) do
     district = get_district(params["district"] || conn.cookies["district"])

      |> Enum.map(&EventHelp.add_date_line/1)
      |> Enum.map(&EventHelp.add_candidate_attr/1)

    json conn, events
  end
end

      |> Enum.map(&EventHelp.add_date_line/1)
      |> Enum.map(&EventHelp.add_candidate_attr/1)

    events =
      if params["secret"] == @secret do
        Enum.map events, &add_secret_attrs/1
      else
        events
      end

    json conn, events
  end

