post method to get method : ps
This commit is contained in:
parent
91e98f5e92
commit
06b76d1c53
@ -922,8 +922,20 @@ class Template_Management_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
// API 2 Get Template with Form Details V2.0 : ps 20/12/2021
|
||||
public function getTemplateFormsV2_post(){
|
||||
$records = $this->post("records");
|
||||
public function getTemplateFormsV2_get(){
|
||||
if(isset($_GET['map_id']))
|
||||
{
|
||||
$records['map_id'] = $this->get("map_id");}
|
||||
if(isset($_GET['entity_id']))
|
||||
{
|
||||
$records['entity_id'] = $this->get("entity_id");}
|
||||
if(isset($_GET['product_id']))
|
||||
{
|
||||
$records['product_id'] = $this->get("product_id");}
|
||||
if(isset($_GET['customer_segment_id']))
|
||||
{
|
||||
$records['customer_segment_id'] = $this->get("customer_segment_id");}
|
||||
|
||||
$result_array = $this->Template_Management_Model->getTemplateMappingDetailsV2($records);
|
||||
if(!empty($result_array))
|
||||
foreach($result_array as $inx => $arr)
|
||||
|
||||
@ -300,6 +300,10 @@ class Template_Management_Model extends SPARQ_Model {
|
||||
{
|
||||
$this->db->WHERE('TEMPLATE_MAP_V2.customer_segment_id',$value['customer_segment_id']);
|
||||
}
|
||||
if(isset($value['map_id']))
|
||||
{
|
||||
$this->db->WHERE('TEMPLATE_MAP_V2.id',$value['map_id']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->db->WHERE('TEMPLATE_MAP_V2.entity_id',$value);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user