This commit is contained in:
byte[] 2019-11-14 22:31:24 -05:00
parent 9c638c0e3b
commit 187051d56c
2 changed files with 4 additions and 4 deletions

View file

@ -15,9 +15,9 @@ defmodule Philomena.Users.User do
@derive {Phoenix.Param, key: :slug}
schema "users" do
has_many :links, Philomena.Users.Link
has_many :verified_links, Philomena.Users.Link, where: [aasm_state: "verified"]
has_many :public_links, Philomena.Users.Link, where: [public: true, aasm_state: "verified"]
has_many :links, Philomena.UserLinks.UserLink
has_many :verified_links, Philomena.UserLinks.UserLink, where: [aasm_state: "verified"]
has_many :public_links, Philomena.UserLinks.UserLink, where: [public: true, aasm_state: "verified"]
has_many :galleries, Philomena.Galleries.Gallery, foreign_key: :creator_id
has_many :awards, Philomena.Badges.Award

View file

@ -29,7 +29,7 @@ defmodule PhilomenaWeb.Filter.CurrentController do
end
defp update_filter(conn, user, filter) do
{:ok, user} =
{:ok, _user} =
user
|> User.filter_changeset(filter)
|> Repo.update()