projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mastodon API: Fix thread mute detection
[akkoma]
/
lib
/
pleroma
/
web
/
uploader_controller.ex
diff --git
a/lib/pleroma/web/uploader_controller.ex
b/lib/pleroma/web/uploader_controller.ex
index 6c28d1197b1c22188b117f7007e790c4c066a9d3..0cc172698f61ab9bf48108ef31d3299c59e84947 100644
(file)
--- a/
lib/pleroma/web/uploader_controller.ex
+++ b/
lib/pleroma/web/uploader_controller.ex
@@
-1,16
+1,16
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.UploaderController do
use Pleroma.Web, :controller
alias Pleroma.Uploaders.Uploader
defmodule Pleroma.Web.UploaderController do
use Pleroma.Web, :controller
alias Pleroma.Uploaders.Uploader
- def callback(conn,
params = %{"upload_path" => upload_path}
) do
+ def callback(conn,
%{"upload_path" => upload_path} = params
) do
process_callback(conn, :global.whereis_name({Uploader, upload_path}), params)
end
process_callback(conn, :global.whereis_name({Uploader, upload_path}), params)
end
- def callbacks(conn, _) do
- send_resp(conn, 400, "bad request")
- end
-
defp process_callback(conn, pid, params) when is_pid(pid) do
send(pid, {Uploader, self(), conn, params})
defp process_callback(conn, pid, params) when is_pid(pid) do
send(pid, {Uploader, self(), conn, params})
@@
-20,6
+20,6
@@
defmodule Pleroma.Web.UploaderController do
end
defp process_callback(conn, _, _) do
end
defp process_callback(conn, _, _) do
-
send_resp(conn, 400
, "bad request")
+
render_error(conn, :bad_request
, "bad request")
end
end
end
end