fix customer and quick lead
All checks were successful
Build and Publish / build-release (push) Successful in 1m8s
All checks were successful
Build and Publish / build-release (push) Successful in 1m8s
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
defmodule CustomerService.Customer.Queries do
|
||||
import Ecto.Query
|
||||
|
||||
alias CustomerService.Projections.Customer
|
||||
alias CustomerService.Repo
|
||||
|
||||
def list_by_org(org_id, params \\ %{}) when is_binary(org_id) do
|
||||
params = Map.put(params, :org_id, org_id)
|
||||
Flop.validate_and_run(Customer, params, for: Customer)
|
||||
base = from(c in Customer, where: c.org_id == ^org_id)
|
||||
Flop.validate_and_run(base, params, for: Customer)
|
||||
end
|
||||
|
||||
def get_by_org(org_id, customer_id) when is_binary(org_id) and is_binary(customer_id) do
|
||||
|
||||
Reference in New Issue
Block a user