mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-08 11:44:01 +02:00
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:
parent
3aecb5f7c5
commit
dfaa084f1b
1 changed files with 40 additions and 40 deletions
|
@ -325,7 +325,7 @@ sub register {
|
||||||
|
|
||||||
sub disable_caching {
|
sub disable_caching {
|
||||||
my ($response) = @_;
|
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");
|
$response->push_header("Expires", "Sat, 26 Jul 1997 05:00:00 GMT");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,10 +442,10 @@ sub web_brmstatus_json {
|
||||||
},
|
},
|
||||||
"open":${\($status ? 'true' : 'false')},
|
"open":${\($status ? 'true' : 'false')},
|
||||||
"lastchange":$laststchange,
|
"lastchange":$laststchange,
|
||||||
"status": {
|
"state": {
|
||||||
"open":${\($status ? 'true' : 'false')},
|
"open":${\($status ? 'true' : 'false')},
|
||||||
"lastchange":$laststchange,
|
"lastchange":$laststchange,
|
||||||
"message": "open",
|
"message": ${\($status ? 'true' : 'false')},
|
||||||
"icon": {
|
"icon": {
|
||||||
"open": "https://brmlab.cz/status-open-icon.png",
|
"open": "https://brmlab.cz/status-open-icon.png",
|
||||||
"closed": "https://brmlab.cz/status-closed-icon.png"
|
"closed": "https://brmlab.cz/status-closed-icon.png"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue