Birthdays: hide_birthday -> show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
aaa9314f4c
commit
0266bc3c96
14 changed files with 39 additions and 37 deletions
|
|
@ -234,14 +234,14 @@ defmodule Pleroma.User.Query do
|
|||
|
||||
defp compose_query({:birthday_day, day}, query) do
|
||||
query
|
||||
|> where([u], u.hide_birthday == false)
|
||||
|> where([u], u.show_birthday == true)
|
||||
|> where([u], not is_nil(u.birthday))
|
||||
|> where([u], fragment("date_part('day', ?)", u.birthday) == ^day)
|
||||
end
|
||||
|
||||
defp compose_query({:birthday_month, month}, query) do
|
||||
query
|
||||
|> where([u], u.hide_birthday == false)
|
||||
|> where([u], u.show_birthday == true)
|
||||
|> where([u], not is_nil(u.birthday))
|
||||
|> where([u], fragment("date_part('month', ?)", u.birthday) == ^month)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue