Skip to content

Commit

Permalink
update with gist.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
leeduckgo committed Dec 21, 2023
1 parent 0f3e798 commit 3bc2906
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tai_shang_micro_faas_system/code_fetchers/gist.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ defmodule TaiShangMicroFaasSystem.CodeFetchers.Gist do

def get_from_gist(gist_id) do
try do
{:ok, %{"files" => files}} = do_get_from_gist(gist_id)
{:ok, %{files: files}} = do_get_from_gist(gist_id)
# {_file_name, %{"content" => content}} = Enum.fetch!(files, 0)

IO.puts inspect files
content_list = handle_files(files)

# same format as get from arweave.
Expand All @@ -36,7 +36,7 @@ defmodule TaiShangMicroFaasSystem.CodeFetchers.Gist do

def handle_files(files) do
Enum.map(files, fn x ->
{_file_name, %{"content" => content}} = x
{_file_name, %{content: content}} = x
content
end)
end
Expand Down

0 comments on commit 3bc2906

Please sign in to comment.