Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 78f27bf

Browse files
committed
fix(passport): article preload loader
1 parent e1a5018 commit 78f27bf

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/groupher_server_web/middleware/passport_loader.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ defmodule GroupherServerWeb.Middleware.PassportLoader do
4343
# Loader 应该使用 Map 作为参数,以方便模式匹配
4444
def call(%{context: %{cur_user: _}, arguments: %{id: id}} = resolution, source: thread) do
4545
with {:ok, info} <- match(thread),
46-
{:ok, article} <- ORM.find(info.model, id, preload: :author) do
46+
{:ok, article} <- ORM.find(info.model, id, preload: [:author, :communities]) do
4747
resolution
4848
|> assign_owner_info(:article, article)
4949
|> assign_source(article)

test/groupher_server_web/mutation/accounts/customization_test.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ defmodule GroupherServer.Test.Mutation.Account.Customization do
6969
}
7070
}
7171
"""
72-
@tag :wip
7372
test "PageSizeProof middleware should lint c11n displayDensity size", ~m(user)a do
7473
user_conn = simu_conn(:user, user)
7574
db_insert_multi(:post, 50)

0 commit comments

Comments
 (0)