make_moderator.ex: set cache on update
This commit is contained in:
parent
dca1d6d162
commit
18837c2fed
@ -19,7 +19,7 @@ def run([nickname | rest]) do
|
|||||||
|> Map.put("is_moderator", !!moderator)
|
|> Map.put("is_moderator", !!moderator)
|
||||||
|
|
||||||
cng = User.info_changeset(user, %{info: info})
|
cng = User.info_changeset(user, %{info: info})
|
||||||
user = Repo.update!(cng)
|
{:ok, user} = User.update_and_set_cache(cng)
|
||||||
|
|
||||||
IO.puts("Moderator status of #{nickname}: #{user.info["is_moderator"]}")
|
IO.puts("Moderator status of #{nickname}: #{user.info["is_moderator"]}")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user