summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-09-21 13:56:40 -0500
committerAlex Gleason <alex@alexgleason.me>2020-09-21 14:09:26 -0500
commit23d5d7cf593550669812527ab12501b2a2adc6eb (patch)
tree70747143a1dced97d7b0c7953e390100a91d8777
parent8b6ac45f3cb5a3c1ac16e766a6f503ee491bc310 (diff)
Fix #2172 HTTP error on password reset
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/auth_controller.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
index 9f09550e1..57c0be5fe 100644
--- a/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/auth_controller.ex
@@ -5,6 +5,8 @@
defmodule Pleroma.Web.MastodonAPI.AuthController do
use Pleroma.Web, :controller
+ import Pleroma.Web.ControllerHelper, only: [json_response: 3]
+
alias Pleroma.User
alias Pleroma.Web.OAuth.App
alias Pleroma.Web.OAuth.Authorization
@@ -61,9 +63,7 @@ defmodule Pleroma.Web.MastodonAPI.AuthController do
TwitterAPI.password_reset(nickname_or_email)
- conn
- |> put_status(:no_content)
- |> json("")
+ json_response(conn, :no_content, "")
end
defp local_mastodon_root_path(conn) do