logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 7d350b73f58664eb822efaa5f522fcf2bd38f669
parent a07310888fa3d46a36f3185ed09da7243921dad4
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  4 Jun 2021 19:57:48 +0200

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.

Diffstat:

Mlib/pleroma/web/endpoint.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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: ["*/*"],