1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

api: be more foregiving in regard to parsing payloads

This commit is contained in:
Steffen Vogel 2022-05-19 17:20:23 +02:00
parent c499b28473
commit 69c70d17bc

View file

@ -65,8 +65,6 @@ public:
pthread_mutex_unlock(&api_node->write.mutex);
logger->info("resp: {}", (void *) json_signal);
return new JsonResponse(session, HTTP_STATUS_OK, json_signal);
}
@ -94,7 +92,7 @@ public:
double value = 0;
json_error_t err;
ret = json_unpack_ex(body, &err, 0, "{ s: f, s: f }",
ret = json_unpack_ex(body, &err, 0, "{ s: F, s: F }",
"timestamp", &timestamp,
"value", &value
);