Merge branch 'spaceapi-endpoint' into 'main'
[Fix] fix roomstate.js incompatibility with spaceapi v14 See merge request ccchh/ccchh-website!22
This commit is contained in:
commit
6dcdccec84
1 changed files with 0 additions and 4 deletions
|
@ -44,10 +44,6 @@ function updateRoomState(openState, lastChangeTimestamp) {
|
||||||
function parseResponse(apiJson) {
|
function parseResponse(apiJson) {
|
||||||
console.debug('SpaceAPI got:', apiJson)
|
console.debug('SpaceAPI got:', apiJson)
|
||||||
|
|
||||||
if (typeof apiJson.api === "undefined") {
|
|
||||||
console.error("SpaceAPI JSON invalid: 'api' item not present")
|
|
||||||
return [null, null]
|
|
||||||
}
|
|
||||||
if (typeof apiJson.state === "undefined") {
|
if (typeof apiJson.state === "undefined") {
|
||||||
console.error("SpaceAPI JSON invalid: 'state' item not present")
|
console.error("SpaceAPI JSON invalid: 'state' item not present")
|
||||||
return [null, null]
|
return [null, null]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue