mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
updates kontakt_id / adresse_id in profilUpdateRequest after inserting new kontakt/adresse in db
This commit is contained in:
@@ -115,7 +115,7 @@ class Profil extends Auth_Controller
|
||||
$existing_change = json_decode($update_request->requested_change);
|
||||
|
||||
|
||||
if(property_exists($existing_change,$type) && property_exists($payload,$type) && $existing_change->$type == $payload->$type){
|
||||
if(!isset($existing_change->add) && property_exists($existing_change,$type) && property_exists($payload,$type) && $existing_change->$type == $payload->$type){
|
||||
//? the kontakt_id / adresse_id of a change has to be unique
|
||||
|
||||
echo json_encode(error("cannot change the same resource twice"));
|
||||
|
||||
Reference in New Issue
Block a user