fix to string method
All checks were successful
Build and Publish / build-release (push) Successful in 1m2s
All checks were successful
Build and Publish / build-release (push) Successful in 1m2s
This commit is contained in:
@@ -221,7 +221,7 @@ defmodule CustomerServiceWeb.CustomerController do
|
|||||||
defp dispatch_and_return(conn, command, %CustomerId{} = customer_id) do
|
defp dispatch_and_return(conn, command, %CustomerId{} = customer_id) do
|
||||||
case CustomerService.CommandedApp.dispatch(command, consistency: :strong) do
|
case CustomerService.CommandedApp.dispatch(command, consistency: :strong) do
|
||||||
:ok ->
|
:ok ->
|
||||||
case CustomerQueries.get_customer(CustomerId.to_string(customer_id)) do
|
case CustomerQueries.get_customer(to_string(customer_id)) do
|
||||||
{:ok, customer} ->
|
{:ok, customer} ->
|
||||||
conn |> put_status(:ok) |> json(%{data: customer_json(customer)})
|
conn |> put_status(:ok) |> json(%{data: customer_json(customer)})
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ defmodule CustomerServiceWeb.LeadController do
|
|||||||
defp dispatch_and_return(conn, command, %LeadId{} = lead_id) do
|
defp dispatch_and_return(conn, command, %LeadId{} = lead_id) do
|
||||||
case CustomerService.CommandedApp.dispatch(command, consistency: :strong) do
|
case CustomerService.CommandedApp.dispatch(command, consistency: :strong) do
|
||||||
:ok ->
|
:ok ->
|
||||||
case LeadQueries.get_lead(LeadId.to_string(lead_id)) do
|
case LeadQueries.get_lead(to_string(lead_id)) do
|
||||||
{:ok, lead} ->
|
{:ok, lead} ->
|
||||||
conn |> put_status(:ok) |> json(%{data: lead_json(lead)})
|
conn |> put_status(:ok) |> json(%{data: lead_json(lead)})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user