From 8ebb6539bcc184b08c746d30534ee0419a79bbbd Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 16 Apr 2019 17:15:11 +0100 Subject: [PATCH] [server/list-reading-types] Don't return an error if a device hasn't submitted any data yet --- Changelog.md | 3 +++ logic/Actions/ListReadingTypes.php | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index cb77a88..1ffaae1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +## v0.7.1 - 16th April 2019 + - [API] `list-reading-types` no longer returns an error if a device hasn't submitted any readings yet + ## v0.7 - 14th April 2019 - Added experimental heatmap time slider! diff --git a/logic/Actions/ListReadingTypes.php b/logic/Actions/ListReadingTypes.php index af21628..2643fbb 100644 --- a/logic/Actions/ListReadingTypes.php +++ b/logic/Actions/ListReadingTypes.php @@ -52,11 +52,7 @@ class ListReadingTypes implements IAction { // 1.5: Validate data from database if(empty($data)) { - http_response_code(404); - header("content-type: text/plain"); - header("x-time-taken: " . PerfFormatter::format_perf_data($start_time, $start_handle, null)); - echo("Error: No types are currently present in the system."); - return false; + header("x-notice: No reading types found for that request"); } // 3: Serialise data