fix: update weight field in update payload to only include values greater than 10
This commit is contained in:
parent
0b356609d1
commit
cf8cce72a5
@ -147,7 +147,7 @@ bool updateSpoolTagId(String uidString, const char* payload) {
|
|||||||
// Update Payload erstellen
|
// Update Payload erstellen
|
||||||
JsonDocument updateDoc;
|
JsonDocument updateDoc;
|
||||||
updateDoc["extra"]["nfc_id"] = "\""+uidString+"\"";
|
updateDoc["extra"]["nfc_id"] = "\""+uidString+"\"";
|
||||||
updateDoc["weight"] = weight;
|
if (weight > 10) updateDoc["weight"] = weight;
|
||||||
|
|
||||||
String updatePayload;
|
String updatePayload;
|
||||||
serializeJson(updateDoc, updatePayload);
|
serializeJson(updateDoc, updatePayload);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user