forked from AkkomaGang/akkoma
formating
This commit is contained in:
parent
ffec96d8cc
commit
dfc9c08796
2 changed files with 14 additions and 11 deletions
|
@ -237,6 +237,7 @@ defp set_moderator(user, value) do
|
|||
|> Map.put("is_moderator", value)
|
||||
|
||||
info_cng = User.Info.admin_api_update(user.info, %{is_moderator: value})
|
||||
|
||||
user_cng =
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
@ -252,6 +253,7 @@ defp set_admin(user, value) do
|
|||
|> Map.put("is_admin", value)
|
||||
|
||||
info_cng = User.Info.admin_api_update(user.info, %{is_admin: value})
|
||||
|
||||
user_cng =
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
@ -267,6 +269,7 @@ defp set_locked(user, value) do
|
|||
|> Map.put("locked", value)
|
||||
|
||||
info_cng = User.Info.user_upgrade(user.info, %{locked: value})
|
||||
|
||||
user_cng =
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
|
Loading…
Reference in a new issue