Resolve "Fix privacy required fields" #943
1 changed files with 3 additions and 2 deletions
|
|
@ -1449,7 +1449,7 @@ class APIController extends Controller
|
||||||
{
|
{
|
||||||
$required_params = [
|
$required_params = [
|
||||||
'priv_third_party',
|
'priv_third_party',
|
||||||
'priv_promo',
|
// 'priv_promo',
|
||||||
];
|
];
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$res = $this->checkParamsAndKey($req, $em, $required_params);
|
$res = $this->checkParamsAndKey($req, $em, $required_params);
|
||||||
|
|
@ -1466,8 +1466,9 @@ class APIController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// set privacy settings
|
// set privacy settings
|
||||||
|
$priv_promo = $req->request->get('priv_promo', false);
|
||||||
$cust->setPrivacyThirdParty($req->request->get('priv_third_party'))
|
$cust->setPrivacyThirdParty($req->request->get('priv_third_party'))
|
||||||
->setPrivacyPromo($req->request->get('priv_promo'));
|
->setPrivacyPromo($priv_promo);
|
||||||
|
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue