aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/shard_web/views/page_view.ex
blob: 8d391912f3e24b684c023f2dcdb0c9b321a8c0f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
defmodule ShardWeb.PageView do
  use ShardWeb, :view

  def peer_list do
    :ets.tab2list(:peer_db)
  end

  def peer_id_to_str(id) do
    id
    |> binary_part(0, 8)
    |> Base.encode16
    |> String.downcase
  end
end