diff options
author | Francis Dinh <normandy@firemail.cc> | 2018-05-19 21:23:52 -0400 |
---|---|---|
committer | Francis Dinh <normandy@firemail.cc> | 2018-05-19 21:23:52 -0400 |
commit | 1e43de0f86ea632a313f9bf7434183a6db38f0b6 (patch) | |
tree | 0cf215887945a855d49034dd6956e402dce9bb30 /lib/pleroma/user.ex | |
parent | da9744eb8481b4df527d0e360aa30be9ca6b5a3a (diff) | |
download | pleroma-1e43de0f86ea632a313f9bf7434183a6db38f0b6.tar.gz |
Formatting and add tests for blocks/unblocks
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 399a66787..6a8129ac8 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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 |