Browse Source

run mix format

tags/v0.9.9
William Pitcock 6 years ago
parent
commit
6e8de2faae
2 changed files with 19 additions and 11 deletions
  1. +14
    -10
      lib/pleroma/user.ex
  2. +5
    -1
      test/support/httpoison_mock.ex

+ 14
- 10
lib/pleroma/user.ex View File

@@ -404,18 +404,22 @@ defmodule Pleroma.User do
from(
u in User,
select_merge: %{
search_distance: fragment(
"? <-> (? || ?)",
^query,
u.nickname,
u.name
)}
search_distance:
fragment(
"? <-> (? || ?)",
^query,
u.nickname,
u.name
)
}
)

q = from(s in subquery(inner),
order_by: s.search_distance,
limit: 20
)
q =
from(
s in subquery(inner),
order_by: s.search_distance,
limit: 20
)

Repo.all(q)
end


+ 5
- 1
test/support/httpoison_mock.ex View File

@@ -628,7 +628,11 @@ defmodule HTTPoisonMock do
}}
end

def get("https://hubzilla.example.org/channel/kaniini", [Accept: "application/activity+json"], _) do
def get(
"https://hubzilla.example.org/channel/kaniini",
[Accept: "application/activity+json"],
_
) do
{:ok,
%Response{
status_code: 200,


Loading…
Cancel
Save