projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pleroma.Upload: Set default upload name / description based on config.
[akkoma]
/
lib
/
pleroma
/
web
/
uploader_controller.ex
diff --git
a/lib/pleroma/web/uploader_controller.ex
b/lib/pleroma/web/uploader_controller.ex
index 5d8a77346fb6d3f299d8300206f2061fe61840c6..6533f1c0e5df262bdce28f62800176dc45ccd4d3 100644
(file)
--- a/
lib/pleroma/web/uploader_controller.ex
+++ b/
lib/pleroma/web/uploader_controller.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.UploaderController do
use Pleroma.Web, :controller
defmodule Pleroma.Web.UploaderController do
use Pleroma.Web, :controller
@@
-7,10
+11,6
@@
defmodule Pleroma.Web.UploaderController 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