forked from AkkomaGang/akkoma
Further simplify changeset logic
This commit is contained in:
parent
f7e59c28ed
commit
63923df0a5
1 changed files with 1 additions and 2 deletions
|
@ -2328,8 +2328,7 @@ def confirmation_changeset(user, need_confirmation: need_confirmation?) do
|
|||
|
||||
@spec approval_changeset(User.t(), keyword()) :: Changeset.t()
|
||||
def approval_changeset(user, set_approval: approved?) do
|
||||
params = if approved?, do: %{is_approved: true}, else: %{is_approved: false}
|
||||
cast(user, params, [:is_approved])
|
||||
cast(user, %{is_approved: approved?}, [:is_approved])
|
||||
end
|
||||
|
||||
def add_pinnned_activity(user, %Pleroma.Activity{id: id}) do
|
||||
|
|
Loading…
Reference in a new issue