Procházet zdrojové kódy

rich media parser ttl files consistency

1668/default-disable-prometheus
Alexander Strizhakov před 4 roky
rodič
revize
103f3dcb9e
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 22896A53AEF1381
3 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. +1
    -1
      lib/pleroma/web/rich_media/parser/ttl.ex
  2. +1
    -1
      lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex
  3. +1
    -1
      test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs

lib/pleroma/web/rich_media/parsers/ttl/ttl.ex → lib/pleroma/web/rich_media/parser/ttl.ex Zobrazit soubor

@@ -3,5 +3,5 @@
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.RichMedia.Parser.TTL do
@callback ttl(Map.t(), String.t()) :: {:ok, Integer.t()} | {:error, String.t()}
@callback ttl(Map.t(), String.t()) :: Integer.t() | nil
end

lib/pleroma/web/rich_media/parsers/ttl/aws_signed_url.ex → lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex Zobrazit soubor

@@ -5,7 +5,7 @@
defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do
@behaviour Pleroma.Web.RichMedia.Parser.TTL

@impl Pleroma.Web.RichMedia.Parser.TTL
@impl true
def ttl(data, _url) do
image = Map.get(data, :image)


test/pleroma/web/rich_media/parsers/ttl/aws_signed_url_test.exs → test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs Zobrazit soubor

@@ -2,7 +2,7 @@
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.RichMedia.Parsers.TTL.AwsSignedUrlTest do
defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrlTest do
use ExUnit.Case, async: true

test "s3 signed url is parsed correct for expiration time" do

Načítá se…
Zrušit
Uložit