예제 #1
0
// JSON renders the json response for RootAction
func (action *RootAction) JSON() {
	var res resource.Root
	res.Populate(
		action.Ctx,
		action.App.latestLedgerState,
		action.App.horizonVersion,
		action.App.coreVersion,
	)

	hal.Render(action.W, res)
}
예제 #2
0
// JSON renders the json response for RootAction
func (action *RootAction) JSON() {
	action.App.UpdateStellarCoreInfo()

	var res resource.Root
	res.Populate(
		action.Ctx,
		action.App.latestLedgerState.Horizon,
		action.App.latestLedgerState.Core,
		action.App.horizonVersion,
		action.App.coreVersion,
		action.App.networkPassphrase,
	)

	hal.Render(action.W, res)
}