#732 Node Search via API for known node returns invalid or empty JSON
A few things going on here ... swagger submitting "false" query
params which intefered with truth testing by existence, and also the
Node search not using {results => {}} format response for template,
and also that response then containing DBIC objects which cannot be
translated to JSON without running HRI first.
This commit is contained in:
@@ -7,6 +7,7 @@ use Dancer::Plugin::Auth::Extensible;
|
||||
use NetAddr::IP::Lite ':lower';
|
||||
use Regexp::Common 'net';
|
||||
use NetAddr::MAC ();
|
||||
use POSIX qw/strftime/;
|
||||
|
||||
use App::Netdisco::Web::Plugin;
|
||||
use App::Netdisco::Util::Web 'sql_match';
|
||||
@@ -42,6 +43,7 @@ register_search_tab({
|
||||
},
|
||||
daterange => {
|
||||
description => 'Date Range in format "YYYY-MM-DD to YYYY-MM-DD"',
|
||||
default => ('1970-01-01 to '. strftime('%Y-%m-%d', gmtime)),
|
||||
},
|
||||
age_invert => {
|
||||
description => 'Results should NOT be within daterange',
|
||||
|
||||
Reference in New Issue
Block a user