Skip to content

Commit

Permalink
Updates based on Oleksii's PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
robacourt committed Aug 7, 2024
1 parent e72d7c3 commit 967a969
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/sync-service/lib/electric/plug/serve_shape_plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Electric.Plug.ServeShapePlug do

# Control messages
@up_to_date [Jason.encode!(%{headers: %{control: "up-to-date"}})]
@must_refetch [%{headers: %{control: "must-refetch"}}]
@must_refetch Jason.encode!([%{headers: %{control: "must-refetch"}}])

defmodule Params do
use Ecto.Schema
Expand Down Expand Up @@ -194,10 +194,7 @@ defmodule Electric.Plug.ServeShapePlug do
"location",
"#{conn.request_path}?shape_id=#{active_shape_id}&offset=-1"
)
|> send_resp(
409,
Jason.encode_to_iodata!(@must_refetch)
)
|> send_resp(409, @must_refetch)
|> halt()
else
conn
Expand Down

0 comments on commit 967a969

Please sign in to comment.