From 0d358f6f699a5ce04ffe1bccf4f375b5f321391c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 12 Oct 2018 15:52:42 +0200 Subject: Private chat interface --- shardweb/lib/router.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shardweb/lib/router.ex') 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 -- cgit v1.2.3