aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/router.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
commit0d358f6f699a5ce04ffe1bccf4f375b5f321391c (patch)
treeb90a1093b3ac0cd1e7d3643abb34e87078b6072e /shardweb/lib/router.ex
parent1e91dc596fd2f7fdd96b7fd2fc50724f93e46529 (diff)
downloadshard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.tar.gz
shard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.zip
Private chat interface
Diffstat (limited to 'shardweb/lib/router.ex')
-rw-r--r--shardweb/lib/router.ex6
1 files changed, 4 insertions, 2 deletions
diff --git a/shardweb/lib/router.ex b/shardweb/lib/router.ex
index 43de0da..2c69b8c 100644
--- a/shardweb/lib/router.ex
+++ b/shardweb/lib/router.ex
@@ -23,13 +23,14 @@ defmodule ShardWeb.Router do
get "/dashboard", PageController, :shard_list
get "/people", IdentityController, :list
+ get "/people/:pk", IdentityController, :view
get "/identity", IdentityController, :self
post "/identity", IdentityController, :update
post "/identity/switch", IdentityController, :switch
post "/identity/create", IdentityController, :create
- get "/chat/:room", ChatController, :chat
- get "/pm/:pk", ChatController, :privchat
+ get "/chat/:chan", ChatController, :chat
+ get "/pm/:people_list", ChatController, :privchat
end
# Other scopes may use custom stacks.
@@ -50,6 +51,7 @@ defmodule ShardWeb.Router do
conn
|> assign(:pk, pk)
|> assign(:nick, nick)
+ |> assign(:shard, nil)
|> PhoenixGon.Controller.put_gon(pk: (pk|>Base.encode16))
end