install canary map on topic creation action

This commit is contained in:
byte[] 2019-11-29 11:43:53 -05:00
parent ce450b77d9
commit 0e7c239bfe

View file

@ -10,6 +10,8 @@ defmodule PhilomenaWeb.TopicController do
plug PhilomenaWeb.FilterBannedUsersPlug when action in [:new, :create] plug PhilomenaWeb.FilterBannedUsersPlug when action in [:new, :create]
plug PhilomenaWeb.UserAttributionPlug when action in [:new, :create] plug PhilomenaWeb.UserAttributionPlug when action in [:new, :create]
plug PhilomenaWeb.AdvertPlug when action in [:show] plug PhilomenaWeb.AdvertPlug when action in [:show]
plug PhilomenaWeb.CanaryMapPlug, new: :show, create: :show
plug :load_and_authorize_resource, model: Forum, id_name: "forum_id", id_field: "short_name", persisted: true plug :load_and_authorize_resource, model: Forum, id_name: "forum_id", id_field: "short_name", persisted: true
def show(conn, %{"id" => slug} = params) do def show(conn, %{"id" => slug} = params) do