From 3bc29067f1f2e368d8e24d2fa1a8387b04db20a5 Mon Sep 17 00:00:00 2001 From: leeduckgo Date: Thu, 21 Dec 2023 15:19:29 +0800 Subject: [PATCH] update with gist.ex --- lib/tai_shang_micro_faas_system/code_fetchers/gist.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tai_shang_micro_faas_system/code_fetchers/gist.ex b/lib/tai_shang_micro_faas_system/code_fetchers/gist.ex index 8e6a709..d2f49ce 100644 --- a/lib/tai_shang_micro_faas_system/code_fetchers/gist.ex +++ b/lib/tai_shang_micro_faas_system/code_fetchers/gist.ex @@ -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. @@ -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