fix customer and quick lead
All checks were successful
Build and Publish / build-release (push) Successful in 1m8s

This commit is contained in:
2026-05-15 14:43:25 -05:00
parent 782d1e4377
commit 6fe6df4723
2 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -1,10 +1,12 @@
defmodule CustomerService.Lead.Queries do
import Ecto.Query
alias CustomerService.Projections.QuickLead
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(QuickLead, params, for: QuickLead)
base = from(q in QuickLead, where: q.org_id == ^org_id)
Flop.validate_and_run(base, params, for: QuickLead)
end
def get_by_org(org_id, lead_id) when is_binary(org_id) and is_binary(lead_id) do