aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/controllers
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 16:38:11 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 16:38:11 +0200
commitf5b4131160520a2540445619188c3c8e0f37da37 (patch)
treeb966fbbe827a004caa65a87dfb8672754ce022ab /shardweb/lib/controllers
parent0d358f6f699a5ce04ffe1bccf4f375b5f321391c (diff)
downloadshard-f5b4131160520a2540445619188c3c8e0f37da37.tar.gz
shard-f5b4131160520a2540445619188c3c8e0f37da37.zip
Notifications for chat ; useless user info page
Diffstat (limited to 'shardweb/lib/controllers')
-rw-r--r--shardweb/lib/controllers/identity_controller.ex14
1 files changed, 13 insertions, 1 deletions
diff --git a/shardweb/lib/controllers/identity_controller.ex b/shardweb/lib/controllers/identity_controller.ex
index 3c04fe8..dd254bb 100644
--- a/shardweb/lib/controllers/identity_controller.ex
+++ b/shardweb/lib/controllers/identity_controller.ex
@@ -10,7 +10,19 @@ defmodule ShardWeb.IdentityController do
end
def view(conn, %{"pk" => pk}) do
- #TODO
+ {:ok, pk} = Base.decode16(pk)
+ shard = %SApp.Identity.Manifest{pk: pk} |> SData.term_hash
+ pid = Shard.Manager.find_proc shard
+
+ if pid == nil do
+ render conn, ShardWeb.ErrorView, "404.html"
+ else
+ render conn, "view.html",
+ view_pk: pk,
+ view_nick: SApp.Identity.get_nick(pk),
+ shard: shard,
+ pid: pid
+ end
end
def update(conn, params) do