File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ if config_env() == :dev do
55 base_url: System . fetch_env! ( "SUPABASE_URL" ) ,
66 api_key: System . fetch_env! ( "SUPABASE_KEY" ) ,
77 env: config_env ( )
8+
9+ config :supabase , json_library: JSON
810end
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ defmodule Supabase do
166166 apply ( __MODULE__ , which , [ ] )
167167 end
168168
169+ @ json_library Application . compile_env ( :supabase , :json_library , Jason )
170+
169171 @ doc "Returns the configured JSON encoding library for Supabase libraries."
170- def json_library do
171- Application . get_env ( :supabase , :json_library , Jason )
172- end
172+ def json_library , do: @ json_library
173173end
Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ defmodule Supabase.Fetcher.JSONDecoder do
3333
3434 @ doc "Tries to decode the response body as JSON"
3535 @ impl true
36- def decode ( % Response { body: body } , opts \\ [ ] ) do
37- keys = Keyword . get ( opts , :keys , :strings )
38- Supabase . json_library ( ) . decode ( body , keys: keys )
36+ def decode ( % Response { body: body } , _ ) do
37+ Supabase . json_library ( ) . decode ( body )
3938 end
4039end
You can’t perform that action at this time.
0 commit comments