Skip to content

Commit

Permalink
fix: correctly merge and deduplicate headers on fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Apr 28, 2024
1 parent fa6ab1c commit c6a2051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/supabase/fetcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ defmodule Supabase.Fetcher do
@spec default_headers :: list(tuple)
defp default_headers do
[
{"content-type", "application/json"},
{"accept", "application/json"},
{"x-client-info", "supabase-fetch-elixir/#{version()}"}
]
Expand Down Expand Up @@ -279,7 +280,7 @@ defmodule Supabase.Fetcher do

some
|> Kernel.++(other)
|> Enum.dedup_by(fn {name, _} -> name end)
|> Enum.uniq_by(fn {name, _} -> name end)
|> Enum.reject(fn {_, v} -> is_nil(v) end)
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Supabase.Potion.MixProject do
use Mix.Project

@version "0.3.5"
@version "0.3.6"
@source_url "https://github.com/zoedsoupe/supabase"

def project do
Expand Down

0 comments on commit c6a2051

Please sign in to comment.