projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7e59c2
)
Further simplify changeset logic
author
Mark Felder
<feld@feld.me>
Fri, 16 Oct 2020 21:50:44 +0000
(21:50 +0000)
committer
Mark Felder
<feld@feld.me>
Fri, 15 Jan 2021 16:42:02 +0000
(10:42 -0600)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 83a37890aa89d224697ca87bfc1fcbbdc5de47dc..f6eca010939e347b2943d200b24fb48df895d332 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-2328,8
+2328,7
@@
defmodule Pleroma.User 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