mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-03 00:01:50 +02:00
Fixed #35
This commit is contained in:
parent
359441fa33
commit
9f3fbd5630
1 changed files with 20 additions and 9 deletions
|
@ -1538,15 +1538,26 @@ class DomainsController extends Controller
|
|||
|
||||
// Check if $contact_id is not null before update
|
||||
if ($contact_id !== null) {
|
||||
$db->update(
|
||||
'domain_contact_map',
|
||||
[
|
||||
'contact_id' => $contact_id,
|
||||
],
|
||||
[
|
||||
'id' => $contact_map_id['id']
|
||||
]
|
||||
);
|
||||
if ($contact_map_id !== null) {
|
||||
$db->update(
|
||||
'domain_contact_map',
|
||||
[
|
||||
'contact_id' => $contact_id,
|
||||
],
|
||||
[
|
||||
'id' => $contact_map_id['id']
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$db->insert(
|
||||
'domain_contact_map',
|
||||
[
|
||||
'contact_id' => $contact_id,
|
||||
'domain_id' => $domain_id,
|
||||
'type' => $type
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue