mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +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
|
import Ecto.Query
|
||||||
|
|
||||||
plug PhilomenaWeb.FilterBannedUsersPlug when action in [:new, :create, :edit, :update, :destroy]
|
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
|
def index(conn, params) do
|
||||||
commissions =
|
commissions =
|
||||||
|
|
|
@ -4,7 +4,7 @@ defmodule PhilomenaWeb.GalleryController do
|
||||||
alias Philomena.Galleries.Gallery
|
alias Philomena.Galleries.Gallery
|
||||||
import Ecto.Query
|
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
|
def index(conn, params) do
|
||||||
galleries =
|
galleries =
|
||||||
|
|
Loading…
Reference in a new issue