fix applicant and filters
All checks were successful
Build and Publish / build-release (push) Successful in 1m24s
All checks were successful
Build and Publish / build-release (push) Successful in 1m24s
This commit is contained in:
@@ -236,7 +236,8 @@ defmodule PolicyServiceWeb.PolicyController do
|
||||
%{
|
||||
"name" => info["name"],
|
||||
"date_of_birth" => dob,
|
||||
"document_id" => doc
|
||||
"document_id" => doc,
|
||||
"client_type" => "natural"
|
||||
}}
|
||||
end
|
||||
end
|
||||
@@ -249,7 +250,8 @@ defmodule PolicyServiceWeb.PolicyController do
|
||||
"company_name" => info["company_name"],
|
||||
"ruc" => ruc,
|
||||
"legal_rep_name" => info["legal_rep_name"],
|
||||
"legal_rep_document" => info["legal_rep_document"]
|
||||
"legal_rep_document" => info["legal_rep_document"],
|
||||
"client_type" => "juridico"
|
||||
}}
|
||||
end
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ defmodule PolicyServiceWeb.QueryHelpers do
|
||||
defp build_filter_params(fields) do
|
||||
for i <- 0..(@filter_count - 1) do
|
||||
[
|
||||
{:"filters_#{i}_field", [in: :query, schema: %Schema{type: :string, enum: fields}]},
|
||||
{:"filters_#{i}_op", [in: :query, schema: %Schema{type: :string, enum: Flop.Filter.allowed_operators(:all)}]},
|
||||
{:"filters_#{i}_value", [in: :query, schema: %Schema{type: :string}]}
|
||||
{:"filters[#{i}][field]", [in: :query, schema: %Schema{type: :string, enum: fields}]},
|
||||
{:"filters[#{i}][op]", [in: :query, schema: %Schema{type: :string, enum: Flop.Filter.allowed_operators(:all)}]},
|
||||
{:"filters[#{i}][value]", [in: :query, schema: %Schema{type: :string}]}
|
||||
]
|
||||
end |> List.flatten()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user