projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
search: fix 'following' query parameter
[akkoma]
/
lib
/
pleroma
/
web
/
controller_helper.ex
diff --git
a/lib/pleroma/web/controller_helper.ex
b/lib/pleroma/web/controller_helper.ex
index 69946fb81ee6a5571728586e8c8fbde681ccb351..6445966e020c09b6e363599afb66baf2e2f51d53 100644
(file)
--- a/
lib/pleroma/web/controller_helper.ex
+++ b/
lib/pleroma/web/controller_helper.ex
@@
-18,6
+18,12
@@
defmodule Pleroma.Web.ControllerHelper do
def truthy_param?(value), do: not falsy_param?(value)
def truthy_param?(value), do: not falsy_param?(value)
+ def json_response(conn, status, _) when status in [204, :no_content] do
+ conn
+ |> put_resp_header("content-type", "application/json")
+ |> send_resp(status, "")
+ end
+
def json_response(conn, status, json) do
conn
|> put_status(status)
def json_response(conn, status, json) do
conn
|> put_status(status)