zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 47bd2f461d1ae7cf1056ba04690646c0e469e0ad
parent f79f2b694ad77e870df320eef3d6292f39642369
Author: srfsh <dev@srf.sh>
Date:   Tue,  8 Nov 2022 15:36:58 +0300

Zenflows.VF.{Agent,EconomicResource,Organization,Person,Proposal}.Filter: wrap the result in :ok-tuple

Diffstat:
Msrc/zenflows/vf/agent/filter.ex | 2+-
Msrc/zenflows/vf/economic_resource/filter.ex | 2+-
Msrc/zenflows/vf/organization/filter.ex | 2+-
Msrc/zenflows/vf/person/filter.ex | 2+-
Msrc/zenflows/vf/proposal/filter.ex | 2+-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/zenflows/vf/agent/filter.ex b/src/zenflows/vf/agent/filter.ex @@ -28,7 +28,7 @@ alias Zenflows.VF.Agent def all(%{filter: nil}), do: {:ok, Agent} def all(%{filter: params}) do with {:ok, filters} <- all_validate(params) do - Enum.reduce(filters, Agent, &all_f(&2, &1)) + {:ok, Enum.reduce(filters, Agent, &all_f(&2, &1))} end end diff --git a/src/zenflows/vf/economic_resource/filter.ex b/src/zenflows/vf/economic_resource/filter.ex @@ -28,7 +28,7 @@ alias Zenflows.VF.EconomicResource def all(%{filter: nil}), do: {:ok, EconomicResource} def all(%{filter: params}) do with {:ok, filters} <- all_validate(params) do - Enum.reduce(filters, EconomicResource, &all_f(&2, &1)) + {:ok, Enum.reduce(filters, EconomicResource, &all_f(&2, &1))} end end diff --git a/src/zenflows/vf/organization/filter.ex b/src/zenflows/vf/organization/filter.ex @@ -28,7 +28,7 @@ alias Zenflows.VF.Organization def all(%{filter: nil}), do: {:ok, where(Organization, type: :org)} def all(%{filter: params}) do with {:ok, filters} <- all_validate(params) do - Enum.reduce(filters, where(Organization, type: :org), &all_f(&2, &1)) + {:ok, Enum.reduce(filters, where(Organization, type: :org), &all_f(&2, &1))} end end diff --git a/src/zenflows/vf/person/filter.ex b/src/zenflows/vf/person/filter.ex @@ -28,7 +28,7 @@ alias Zenflows.VF.Person def all(%{filter: nil}), do: {:ok, where(Person, type: :per)} def all(%{filter: params}) do with {:ok, filters} <- all_validate(params) do - Enum.reduce(filters, where(Person, type: :per), &all_f(&2, &1)) + {:ok, Enum.reduce(filters, where(Person, type: :per), &all_f(&2, &1))} end end diff --git a/src/zenflows/vf/proposal/filter.ex b/src/zenflows/vf/proposal/filter.ex @@ -28,7 +28,7 @@ alias Zenflows.VF.Proposal def all(%{filter: nil}), do: {:ok, Proposal} def all(%{filter: params}) do with {:ok, filters} <- all_validate(params) do - Enum.reduce(filters, Proposal, &all_f(&2, &1)) + {:ok, Enum.reduce(filters, Proposal, &all_f(&2, &1))} end end