diff --git a/www/commands/updates_show.php b/www/commands/updates_show.php index 021f7b3..1669b1b 100644 --- a/www/commands/updates_show.php +++ b/www/commands/updates_show.php @@ -5,6 +5,12 @@ require_once (__DIR__ . '/../internals/website.php'); /** @var URLRoute $ROUTE */ global $ROUTE; /** @var Website $SITE */ global $SITE; ?> + +forceResult(400, "Wrong parameters."); return; } +$ulname = $API_OPTIONS['ulname']; +?> +
diff --git a/www/internals/modules/selftest.php b/www/internals/modules/selftest.php index 21524cf..4ec0358 100644 --- a/www/internals/modules/selftest.php +++ b/www/internals/modules/selftest.php @@ -125,7 +125,7 @@ class SelfTest implements IWebsiteModule $this->addMethodMultiPathStatus("api::default::updatecheck-7", 200, '/api/update/{0}', function(){ return array_keys(Website::inst()->modules->UpdatesLog()->listUpdateData()); }); $this->addMethodPathStatus( "api::default::egg-status", 200, "/api/extendedgitgraph::status?secret=$ajaxsecret"); $this->addMethodPathStatus( "api::default::an-show", 200, "/api/alephnote::show?secret=$ajaxsecret"); - $this->addMethodPathStatus( "api::default::updates-show", 200, "/api/updates::show?secret=$ajaxsecret"); + $this->addMethodMultiPathStatus("api::default::updates-show", 200, "/api/updates::show?secret=$ajaxsecret&ulname={0}", function(){ return array_key_map(Website::inst()->modules->UpdatesLog()->listProgramsInformation(), 'name'); }); $this->addMethodPathStatus( "api::default::aoc-ajax", 200, "/api/html::panel_aoc_calendar"); $this->addMethodPathStatus( "api::default::404-1", 404, '/api/update/no_prog_xx'); $this->addMethodPathStatus( "api::default::404-2", 404, '/api/asdf::notfound'); |