broken refactor but need to leave now...

This commit is contained in:
Oliver Gorwits
2019-03-22 09:10:19 +00:00
parent 3e0af5888c
commit bd9ba3bcb8
6 changed files with 18 additions and 34 deletions

View File

@@ -22,7 +22,6 @@ swagger_path {
} } },
},
get '/api/device/:identifier' => require_login sub {
vars->{'is_api'} = 1;
forward '/ajax/content/device/details',
{ tab => 'details', q => params->{'identifier'} };
};
@@ -45,7 +44,7 @@ get '/ajax/content/device/details' => require_login sub {
delete $results[0]->{'snmp_comm'};
$results[0]->{'power'} = \@power;
if (vars->{'is_api'}) {
if (request->is_api) {
content_type('application/json');
to_json { device => $results[0] };
}