Packages
A Fair Source multi-agent runtime with deterministic agent scoring and replayable run history.
Retired package: Deprecated - superseded — operator console moved to the Syntropy app
Current section
Files
Jump to
Current section
Files
lib/syntropy_web/controllers/api/event_controller.ex
defmodule SyntropyWeb.Api.EventController do
use SyntropyWeb, :controller
alias SyntropyWeb.Api.{ControllerHelpers, EventJSON}
@spec index(Plug.Conn.t(), map()) :: Plug.Conn.t()
def index(conn, params) do
limit = ControllerHelpers.limit(params)
json(conn, %{data: Enum.map(Syntropy.events(limit), &EventJSON.event/1)})
end
end