Skip to content

Commit

Permalink
fix: added proper content types to migration info responses (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
icehaunter authored Jan 23, 2023
1 parent d40e373 commit 89cdcdf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/electric/plug/migrations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ defmodule Electric.Plug.Migrations do

get "/" do
data = migration_info()
send_resp(conn, 200, Jason.encode!(data))

conn
|> put_resp_content_type("application/json")
|> send_resp(200, Jason.encode!(data))
end

get "/:origin" do
origin = get_origin(conn)
data = migration_info(origin)
send_resp(conn, 200, Jason.encode!(data))

conn
|> put_resp_content_type("application/json")
|> send_resp(200, Jason.encode!(data))
end

put "/:origin" do
Expand Down

0 comments on commit 89cdcdf

Please sign in to comment.