don't load the entire world

This commit is contained in:
byte[] 2019-11-17 23:59:32 -05:00
parent 809da3c73f
commit cd48d948cb
2 changed files with 2 additions and 2 deletions

View file

@ -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 =

View file

@ -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 =