mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-21 10:25:00 +00:00
[server/list-reading-types] Don't return an error if a device hasn't submitted any data yet
This commit is contained in:
parent
3b4f907164
commit
8ebb6539bc
2 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# 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
|
## v0.7 - 14th April 2019
|
||||||
- Added experimental heatmap time slider!
|
- Added experimental heatmap time slider!
|
||||||
|
|
||||||
|
|
|
@ -52,11 +52,7 @@ class ListReadingTypes implements IAction {
|
||||||
|
|
||||||
// 1.5: Validate data from database
|
// 1.5: Validate data from database
|
||||||
if(empty($data)) {
|
if(empty($data)) {
|
||||||
http_response_code(404);
|
header("x-notice: No reading types found for that request");
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3: Serialise data
|
// 3: Serialise data
|
||||||
|
|
Loading…
Reference in a new issue