1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-16 19:10:54 +00:00

Merge pull request #316 from joyfullservice/master

Update key verification syntax
This commit is contained in:
Lukas Bachschwell 2024-11-06 09:32:25 +01:00 committed by GitHub
commit ceffe2b7b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -310,14 +310,14 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
break; break;
} }
if(!FragmentRequest.containsKey(F("id"))) if(!FragmentRequest["id"].is<JsonVariant>())
{ {
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID")); Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID"));
break; break;
} }
uint16_t ControlId = uint16_t(FragmentRequest[F("id")]); uint16_t ControlId = uint16_t(FragmentRequest[F("id")]);
if(!FragmentRequest.containsKey(F("offset"))) if(!FragmentRequest["offset"].is<JsonVariant>())
{ {
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset")); Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset"));
break; break;