Skip to content

Commit

Permalink
Add insertion of network info to Client API
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmartinezm authored and kylemhall committed Jul 17, 2023
1 parent 798fc8b commit 27830f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Libki/Controller/API/Client/v1_0.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ sub index : Path : Args(0) {
my $macaddress= $c->request->params->{'macaddress'};
my $hostname = $c->request->params->{'hostname'};

$log->debug( "Network info from client: IP $ipaddress, MAC $macaddress, Hostname $hostname" );

$c->model('DB::Location')->update_or_create(
{
instance => $instance,
Expand All @@ -74,6 +72,9 @@ sub index : Path : Args(0) {
name => $node_name,
location => $location ? $location : undef,
type => $type ? $type : undef,
ipaddress => $ipaddress? $ipaddress: undef,
macaddress => $macaddress? $macaddress: undef,
hostname => $hostname ? $hostname : undef,
last_registered => $now,
}
);
Expand Down

0 comments on commit 27830f8

Please sign in to comment.