Skip to content

Commit

Permalink
Add serial to version
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Jul 2, 2024
1 parent 472ab94 commit dd67e35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/polar_web/controllers/publish/version_json.ex
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defmodule PolarWeb.Publish.VersionJSON do
def show(%{version: version}) do
%{data: %{id: version.id}}
%{data: %{id: version.id, serial: version.serial}}
end

def create(%{version: version}) do
%{data: %{id: version.id}}
%{data: %{id: version.id, serial: version.serial}}
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule PolarWeb.Publish.VersionControllerTest do

assert %{"data" => data} = json_response(conn, 200)

assert %{"id" => _id} = data
assert %{"id" => _id, "serial" => _serial} = data
end
end

Expand Down Expand Up @@ -90,7 +90,7 @@ defmodule PolarWeb.Publish.VersionControllerTest do

assert %{"data" => data} = json_response(conn, 201)

assert %{"id" => _id} = data
assert %{"id" => _id, "serial" => _serial} = data
end
end
end

0 comments on commit dd67e35

Please sign in to comment.