mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-25 17:43:35 +05:00
Ensure messageId is a uint8_t
This commit is contained in:
@@ -870,11 +870,11 @@ protected:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doc[FPSTR(S_MESSAGE_ID)].isNull() || !doc[FPSTR(S_MESSAGE_ID)].is<int>()) {
|
if (doc[FPSTR(S_MESSAGE_ID)].isNull() || !doc[FPSTR(S_MESSAGE_ID)].is<byte>()) {
|
||||||
this->webServer->send(400);
|
this->webServer->send(400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto messageId = doc[FPSTR(S_MESSAGE_ID)].as<int>();
|
auto messageId = doc[FPSTR(S_MESSAGE_ID)].as<byte>();
|
||||||
doc.clear();
|
doc.clear();
|
||||||
doc.shrinkToFit();
|
doc.shrinkToFit();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user