Applied relationships preloading to GET /api/v1/accounts/relationships. Refactoring (User.binary_id/1).
This commit is contained in:
parent
8f1d622b8d
commit
be5e2c4dbb
6 changed files with 30 additions and 23 deletions
|
|
@ -24,10 +24,10 @@ defmodule Pleroma.ThreadMute do
|
|||
end
|
||||
|
||||
def query(user_id, context) do
|
||||
{:ok, user_id} = FlakeId.Ecto.CompatType.dump(user_id)
|
||||
user_binary_id = User.binary_id(user_id)
|
||||
|
||||
ThreadMute
|
||||
|> Ecto.Query.where(user_id: ^user_id)
|
||||
|> Ecto.Query.where(user_id: ^user_binary_id)
|
||||
|> Ecto.Query.where(context: ^context)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue