Relaxed dependency requirements for ecto
and ecto_sql
.
This is a breaking release.
If you have been using the Idempotency.Handler behaviour, change your plug to this:
plug IdempotencyPlug,
tracker: MyAppWeb.RequestTracker,
idempotency_key: {MyAppWeb.IdempotencyPlugHandler, :scope_idempotency_key},
with: {MyAppWeb.IdempotencyPlugHandler, :handle_error}
And change your handler module to this:
defmodule MyAppWeb.IdempotencyPlugHandler do
import Phoenix.Controller
import Plug.Conn
def scope_idempotency_key(conn, key), do: {conn.assigns.current_user.id, key}
def handle_error(conn, error) do
conn
|> put_status(Plug.Exception.status(error))
|> json(%{error: error.message})
|> halt()
end
end
- IdempotencyPlug.Handler removed
- IdempotencyPlug raises errors by default
- IdempotencyPlug now accepts
:idempotency_key
,:request_payload
,:hash
, and:with
options - IdempotencyPlug now requires
:tracker
option - SHA256 hashing now accepts Erlang terms instead of just binary
- Fix source url and name in docs
- Fix indention for generated Ecto migration
- Initial release