mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
Websocket handler: fix never matching code on failed auth
`:cowboy_req.reply` does not return tuples since 2.0, see https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.reply/
This commit is contained in:
parent
e16e8f9816
commit
01fa68fe45
|
@ -37,12 +37,12 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
|
|||
else
|
||||
{:error, :bad_topic} ->
|
||||
Logger.debug("#{__MODULE__} bad topic #{inspect(req)}")
|
||||
{:ok, req} = :cowboy_req.reply(404, req)
|
||||
req = :cowboy_req.reply(404, req)
|
||||
{:ok, req, state}
|
||||
|
||||
{:error, :unauthorized} ->
|
||||
Logger.debug("#{__MODULE__} authentication error: #{inspect(req)}")
|
||||
{:ok, req} = :cowboy_req.reply(401, req)
|
||||
req = :cowboy_req.reply(401, req)
|
||||
{:ok, req, state}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue