diff --git a/lib/philomena_web/controllers/commission_controller.ex b/lib/philomena_web/controllers/commission_controller.ex index a5d7e871..ffdbb44a 100644 --- a/lib/philomena_web/controllers/commission_controller.ex +++ b/lib/philomena_web/controllers/commission_controller.ex @@ -7,7 +7,7 @@ defmodule PhilomenaWeb.CommissionController do import Ecto.Query plug PhilomenaWeb.FilterBannedUsersPlug when action in [:new, :create, :edit, :update, :destroy] - plug :load_and_authorize_resource, model: Commission, preload: [sheet_image: :tags, user: [awards: :badge], items: [example_image: :tags]] + plug :load_and_authorize_resource, model: Commission, only: [:show], preload: [sheet_image: :tags, user: [awards: :badge], items: [example_image: :tags]] def index(conn, params) do commissions = diff --git a/lib/philomena_web/controllers/gallery_controller.ex b/lib/philomena_web/controllers/gallery_controller.ex index f1992f44..59600cd9 100644 --- a/lib/philomena_web/controllers/gallery_controller.ex +++ b/lib/philomena_web/controllers/gallery_controller.ex @@ -4,7 +4,7 @@ defmodule PhilomenaWeb.GalleryController do alias Philomena.Galleries.Gallery import Ecto.Query - plug :load_resource, model: Gallery, preload: [:creator, thumbnail: :tags] + plug :load_resource, model: Gallery, only: [:show], preload: [:creator, thumbnail: :tags] def index(conn, params) do galleries =