status -> state, cache-control

JSON compliant to the specs 0.13, 0.12, 0.11, 0.9, 0.8 spaceapi
This commit is contained in:
Pavel Ruzicka 2013-06-10 22:13:18 +03:00
parent 3aecb5f7c5
commit dfaa084f1b

View file

@ -325,7 +325,7 @@ sub register {
sub disable_caching {
my ($response) = @_;
$response->push_header("Cache-Control", "no-cache, must-revalidate");
$response->push_header("Cache-Control", "no-cache");
$response->push_header("Expires", "Sat, 26 Jul 1997 05:00:00 GMT");
}
@ -442,10 +442,10 @@ sub web_brmstatus_json {
},
"open":${\($status ? 'true' : 'false')},
"lastchange":$laststchange,
"status": {
"state": {
"open":${\($status ? 'true' : 'false')},
"lastchange":$laststchange,
"message": "open",
"message": ${\($status ? 'true' : 'false')},
"icon": {
"open": "https://brmlab.cz/status-open-icon.png",
"closed": "https://brmlab.cz/status-closed-icon.png"