mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
don't load the entire world
This commit is contained in:
parent
809da3c73f
commit
cd48d948cb
2 changed files with 2 additions and 2 deletions
|
@ -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 =
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue