Migrate to comeonin 4 and Cachex 3

Also fix some warning in the code and add a missing alias
This commit is contained in:
Thog 2018-05-20 18:05:34 +02:00
commit e55c6f311b
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
11 changed files with 42 additions and 48 deletions

View file

@ -275,11 +275,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
{:ok, activity} =
Cachex.get!(
:idempotency_cache,
idempotency_key,
fallback: fn _ -> CommonAPI.post(user, params) end
)
Cachex.fetch!(:idempotency_cache, idempotency_key, fn _ -> CommonAPI.post(user, params) end)
render(conn, StatusView, "status.json", %{activity: activity, for: user, as: :activity})
end