From: Haelwenn (lanodan) Monnier Date: Fri, 4 Jun 2021 17:57:48 +0000 (+0200) Subject: web endpoint: Use Config.get directly instead of a tuple X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7d350b73f58664eb822efaa5f522fcf2bd38f669;p=akkoma web endpoint: Use Config.get directly instead of a tuple Fixes a lot of warnings like the following while running the testsuite: warning: passing a {module, function, args} tuple to Plug.Parsers.MULTIPART is deprecated. Please see Plug.Parsers.MULTIPART module docs for better approaches to configuration This might mean no more dynamic configuration but there seems to be the same limitation two lines underneath anyway. --- diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 8e274de88..7591d0ae5 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -102,7 +102,7 @@ defmodule Pleroma.Web.Endpoint do plug(Plug.Parsers, parsers: [ :urlencoded, - {:multipart, length: {Config, :get, [[:instance, :upload_limit]]}}, + {:multipart, length: Config.get([:instance, :upload_limit])}, :json ], pass: ["*/*"],