projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73904e8
)
Make token exchange return errors with 400 as status code
author
D Anzorge
<d.anzorge@gmail.com>
Wed, 6 Jun 2018 01:14:50 +0000
(
03:14
+0200)
committer
D Anzorge
<d.anzorge@gmail.com>
Wed, 6 Jun 2018 01:14:50 +0000
(
03:14
+0200)
lib/pleroma/web/oauth/oauth_controller.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/oauth/oauth_controller.ex
b/lib/pleroma/web/oauth/oauth_controller.ex
index bc6c365c9e2a3e93ab679dbae31d16accf10d5b7..3dd87d0ab9d7ea716ec7af8b32a59e2dc98d5e11 100644
(file)
--- a/
lib/pleroma/web/oauth/oauth_controller.ex
+++ b/
lib/pleroma/web/oauth/oauth_controller.ex
@@
-71,7
+71,9
@@
defmodule Pleroma.Web.OAuth.OAuthController do
json(conn, response)
else
- _error -> json(conn, %{error: "Invalid credentials"})
+ _error ->
+ put_status(conn, 400)
+ |> json(%{error: "Invalid credentials"})
end
end
@@
-96,7
+98,9
@@
defmodule Pleroma.Web.OAuth.OAuthController do
json(conn, response)
else
- _error -> json(conn, %{error: "Invalid credentials"})
+ _error ->
+ put_status(conn, 400)
+ |> json(%{error: "Invalid credentials"})
end
end