aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-09-11 23:04:01 +0300
committerrinpatch <rinpatch@sdf.org>2019-09-11 23:06:31 +0300
commit56828abf6de81a52079b26cf899b91fdd822f2ce (patch)
tree78d20dabd5ae2296336d3c81ec88f2ce4824ff6c
parent46ae62d159ca0a330d18a2e1f775a5ed9eaebc42 (diff)
downloadpleroma-56828abf6de81a52079b26cf899b91fdd822f2ce.tar.gz
Use Jason for rendering responses
Although Jason readme says Phoenix 1.4+ already does it by default, [it actually does it only for new projects](https://github.com/phoenixframework/phoenix/blob/3bfb9f6e900c9a2e31cb95736e2cb5bdad329b61/lib/phoenix.ex#L58-L59)
-rw-r--r--config/config.exs2
-rw-r--r--lib/pleroma/healthcheck.ex (renamed from lib/healthcheck.ex)1
2 files changed, 3 insertions, 0 deletions
diff --git a/config/config.exs b/config/config.exs
index 5206fe375..0e91df886 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -373,6 +373,8 @@ config :pleroma, :chat, enabled: true
config :phoenix, :format_encoders, json: Jason
+config :phoenix, :json_library, Jason
+
config :pleroma, :gopher,
enabled: false,
ip: {0, 0, 0, 0},
diff --git a/lib/healthcheck.ex b/lib/pleroma/healthcheck.ex
index f97d14432..977b78c26 100644
--- a/lib/healthcheck.ex
+++ b/lib/pleroma/healthcheck.ex
@@ -9,6 +9,7 @@ defmodule Pleroma.Healthcheck do
alias Pleroma.Healthcheck
alias Pleroma.Repo
+ @derive Jason.Encoder
defstruct pool_size: 0,
active: 0,
idle: 0,