diff options
author | Eugenij <eugenijm@protonmail.com> | 2019-07-17 18:09:31 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-07-17 18:09:31 +0000 |
commit | 4bf2bb9cff2d263e1b022f5c40128ffcbd372746 (patch) | |
tree | e3c37dfbd7e915e87d6a6e893959c3dfd037c5c2 /lib/pleroma/web/twitter_api/twitter_api_controller.ex | |
parent | ce73d5f6a53826c85e46bbe45835b99ceaab67cd (diff) | |
download | pleroma-4bf2bb9cff2d263e1b022f5c40128ffcbd372746.tar.gz |
Fix password reset for non-test env
Fixes `Plug.Conn.NotSentError` that causes a 5xx error in response
instead of 404 and 400.
Fixes pattern matching error caused by different response format
in test and non-test env: `Pleroma.Emails.Mailer.deliver_async` returns
:ok when PleromaJobQueue is enabled and `{:ok, _}` when it's disabled.
In tests, it's disabled.
Diffstat (limited to 'lib/pleroma/web/twitter_api/twitter_api_controller.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/twitter_api_controller.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index 8cb703501..5dfab6a6c 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -440,10 +440,10 @@ defmodule Pleroma.Web.TwitterAPI.Controller do json_response(conn, :no_content, "") else {:error, "unknown user"} -> - put_status(conn, :not_found) + send_resp(conn, :not_found, "") {:error, _} -> - put_status(conn, :bad_request) + send_resp(conn, :bad_request, "") end end |