mirror of
https://gh.llkk.cc/https://github.com/CaptainCore/captaincore-manager.git
synced 2025-10-03 14:04:44 +08:00
🐛 FIX: Domain remote id
This commit is contained in:
parent
f1e4399f8d
commit
69af3a8c48
1 changed files with 5 additions and 2 deletions
|
@ -89,7 +89,7 @@ class Domain {
|
|||
}
|
||||
|
||||
// Search API for domain ID
|
||||
foreach ( $constellix_all_domains as $item ) {
|
||||
foreach ( $constellix_all_domains->data as $item ) {
|
||||
if ( $domain->name == $item->name ) {
|
||||
$remote_id = $item->id;
|
||||
break;
|
||||
|
@ -111,9 +111,12 @@ class Domain {
|
|||
];
|
||||
}
|
||||
$response = Remote\Constellix::post( 'domains', $arguments );
|
||||
if ( ! empty( $response->data ) ) {
|
||||
$remote_id = $response->data->id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $response->errors ) ) {
|
||||
return [ "errors" => $response->errors ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue