Misc bug fixes while testing

This commit is contained in:
Deon George
2022-02-03 17:35:52 +11:00
parent b65289af9f
commit a05ca1c2a4
5 changed files with 6 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ class DomainController extends Controller
{
$oo = Address::where('role',Address::NODE_NC)
->where('zone_id',$o->id)
->when($region,function($query,$region) { return $query->where('region_id',$region)->where('node_id',0); })
->when($region,function($query,$region) { return $query->where('region_id',$region); })
->when((! $region),function($query) use ($region) { return $query->where('region_id',0); })
->where('point_id',0)
->FTNorder()
@@ -77,7 +77,7 @@ class DomainController extends Controller
*/
public function api_hubs(Zone $o,int $host): Collection
{
$oo = Address::where('role',self::NODE_HC)
$oo = Address::where('role',Address::NODE_HC)
->where('zone_id',$o->id)
->when($host,function($query,$host) { return $query->where('host_id',$host)->where('node_id','<>',0); })
->with(['system'])

View File

@@ -283,7 +283,7 @@ class SystemController extends Controller
->where('zones.domain_id',$request->domain_id)
->FTNorder()
->get()
->map(function($item) { return ['id'=>$item->id,'value'=>$item->ftn3d]; });
->map(function($item) { return ['id'=>(string)$item->id,'value'=>$item->ftn3d]; });
}
/**