projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dca1d6d
)
make_moderator.ex: set cache on update
author
eal
<eal@waifu.club>
Mon, 11 Jun 2018 19:53:38 +0000
(22:53 +0300)
committer
eal
<eal@waifu.club>
Mon, 11 Jun 2018 19:53:38 +0000
(22:53 +0300)
lib/mix/tasks/make_moderator.ex
patch
|
blob
|
history
diff --git
a/lib/mix/tasks/make_moderator.ex
b/lib/mix/tasks/make_moderator.ex
index 20f04c54c6e76891dc5fdbb369e19ac75d464c1b..4d427cfd8f40543c5380697bb80b374912d865d3 100644
(file)
--- a/
lib/mix/tasks/make_moderator.ex
+++ b/
lib/mix/tasks/make_moderator.ex
@@
-19,7
+19,7
@@
defmodule Mix.Tasks.SetModerator do
|> Map.put("is_moderator", !!moderator)
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"]}")
else