projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Undoing: Move undoing announcements to the pipeline everywhere.
[akkoma]
/
lib
/
pleroma
/
plugs
/
idempotency_plug.ex
diff --git
a/lib/pleroma/plugs/idempotency_plug.ex
b/lib/pleroma/plugs/idempotency_plug.ex
index 7c06be9eac1eb56c7cbd60f66565d61a9aae6b67..f413970751bc4361423af16a7cfe90fb8fca74dc 100644
(file)
--- a/
lib/pleroma/plugs/idempotency_plug.ex
+++ b/
lib/pleroma/plugs/idempotency_plug.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.IdempotencyPlug do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Plugs.IdempotencyPlug do
@@
-29,16
+29,16
@@
defmodule Pleroma.Plugs.IdempotencyPlug do
{:ok, nil} ->
cache_resposnse(conn, key)
{:ok, nil} ->
cache_resposnse(conn, key)
- {atom, message} when atom in [:ignore, :error] ->
- render_error(conn, message)
-
{:ok, record} ->
send_cached(conn, key, record)
{:ok, record} ->
send_cached(conn, key, record)
+
+ {atom, message} when atom in [:ignore, :error] ->
+ render_error(conn, message)
end
end
defp cache_resposnse(conn, key) do
end
end
defp cache_resposnse(conn, key) do
-
Plug.Conn.
register_before_send(conn, fn conn ->
+ register_before_send(conn, fn conn ->
[request_id] = get_resp_header(conn, "x-request-id")
content_type = get_content_type(conn)
[request_id] = get_resp_header(conn, "x-request-id")
content_type = get_content_type(conn)