Fix credo warning
This commit is contained in:
parent
0b8aeac0f3
commit
159630b21c
1 changed files with 3 additions and 1 deletions
|
@ -11,7 +11,9 @@ defmodule Pleroma.Plugs.IdempotencyPlug do
|
||||||
@impl true
|
@impl true
|
||||||
def init(opts), do: opts
|
def init(opts), do: opts
|
||||||
|
|
||||||
# Sending idempotency keys in `GET` and `DELETE` requests has no effect and should be avoided, as these requests are idempotent by definition.
|
# Sending idempotency keys in `GET` and `DELETE` requests has no effect
|
||||||
|
# and should be avoided, as these requests are idempotent by definition.
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def call(%{method: method} = conn, _) when method in ["POST", "PUT", "PATCH"] do
|
def call(%{method: method} = conn, _) when method in ["POST", "PUT", "PATCH"] do
|
||||||
case get_req_header(conn, "idempotency-key") do
|
case get_req_header(conn, "idempotency-key") do
|
||||||
|
|
Loading…
Reference in a new issue