Current section
44 Versions
Jump to
Current section
44 Versions
Compare versions
3
files changed
+7
additions
-5
deletions
| @@ -54,4 +54,4 @@ | |
| 54 54 | {<<"optional">>,false}, |
| 55 55 | {<<"repository">>,<<"hexpm">>}, |
| 56 56 | {<<"requirement">>,<<"~> 1.1">>}]]}. |
| 57 | - {<<"version">>,<<"1.4.2">>}. |
| 57 | + {<<"version">>,<<"1.4.3">>}. |
| @@ -43,7 +43,8 @@ defmodule Fluminus.API.File do | |
| 43 43 | multimedia?: false |
| 44 44 | }} |
| 45 45 | |
| 46 | - {:error, _} -> |
| 46 | + a = {:error, _} -> |
| 47 | + IO.inspect(a) |
| 47 48 | :error |
| 48 49 | end |
| 49 50 | end |
| @@ -52,9 +53,10 @@ defmodule Fluminus.API.File do | |
| 52 53 | Creates a `#{__MODULE__}` struct from the API response retrieved by `Lesson`. |
| 53 54 | """ |
| 54 55 | @spec from_lesson(api_response :: any()) :: __MODULE__.t() | nil |
| 55 | - def from_lesson(api_response = %{"target" => %{"duration" => _}}), do: from_lesson(api_response, true) |
| 56 | + def from_lesson(api_response = %{"target" => %{"duration" => _, "typeName" => "File"}}), |
| 57 | + do: from_lesson(api_response, true) |
| 56 58 | |
| 57 | - def from_lesson(api_response = %{"target" => %{"isResourceType" => false}}), do: from_lesson(api_response, false) |
| 59 | + def from_lesson(api_response = %{"target" => %{"typeName" => "File"}}), do: from_lesson(api_response, false) |
| 58 60 | |
| 59 61 | def from_lesson(_), do: nil |
| @@ -4,7 +4,7 @@ defmodule Fluminus.MixProject do | |
| 4 4 | def project do |
| 5 5 | [ |
| 6 6 | app: :fluminus, |
| 7 | - version: "1.4.2", |
| 7 | + version: "1.4.3", |
| 8 8 | elixir: "~> 1.6", |
| 9 9 | elixirc_paths: elixirc_paths(Mix.env()), |
| 10 10 | start_permanent: Mix.env() == :prod, |