mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 13:59:55 +01:00
formating
This commit is contained in:
parent
ffec96d8cc
commit
dfc9c08796
2 changed files with 14 additions and 11 deletions
|
@ -237,9 +237,10 @@ defmodule Mix.Tasks.Pleroma.User 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)
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
||||
{:ok, user} = User.update_and_set_cache(user_cng)
|
||||
|
||||
|
@ -252,9 +253,10 @@ defmodule Mix.Tasks.Pleroma.User 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)
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
||||
{:ok, user} = User.update_and_set_cache(user_cng)
|
||||
|
||||
|
@ -267,9 +269,10 @@ defmodule Mix.Tasks.Pleroma.User 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)
|
||||
Ecto.Changeset.change(user)
|
||||
|> put_embed(:info, info_cng)
|
||||
|
||||
{:ok, user} = User.update_and_set_cache(user_cng)
|
||||
|
||||
|
|
Loading…
Reference in a new issue