From: eal Date: Mon, 11 Jun 2018 19:53:38 +0000 (+0300) Subject: make_moderator.ex: set cache on update X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=18837c2fedfc5dc79e78751d5b1b16ea1f0dce87;p=akkoma make_moderator.ex: set cache on update --- diff --git a/lib/mix/tasks/make_moderator.ex b/lib/mix/tasks/make_moderator.ex index 20f04c54c..4d427cfd8 100644 --- 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