rich media parser ttl files consistency

This commit is contained in:
Alexander Strizhakov 2020-06-23 18:33:03 +03:00
parent 7dffaef479
commit 103f3dcb9e
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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)

View file

@ -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