Migrate to comeonin 4 and Cachex 3
Also fix some warning in the code and add a missing alias
This commit is contained in:
parent
413de8e4bc
commit
e55c6f311b
11 changed files with 42 additions and 48 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue