Skip to content

Commit 461777e

Browse files
Merge pull request #186 from PaulReichmuth/patch-1
Fixed Docs missunderstanding
2 parents 2617cb0 + 9ecf160 commit 461777e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/api/lib/controllers/measurementsController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const getDataMulti = async function getDataMulti (req, res, next) {
179179
* @apiUse LocationBody
180180
* @apiUse ContentTypeJSON
181181
* @apiParam (RequestBody) {String} value the measured value of the sensor. Also accepts JSON float numbers.
182-
* @apiParam (RequestBody) {RFC3339Date} [createdAt] the timestamp of the measurement. Should conform to RFC 3339.
182+
* @apiParam (RequestBody) {RFC3339Date} [createdAt] the timestamp of the measurement. Should conform to RFC 3339. Is needed when posting with Location Values!
183183
* @apiParam (RequestBody) {Location} [location] the WGS84-coordinates of the measurement.
184184
*/
185185
const postNewMeasurement = async function postNewMeasurement (req, res, next) {
@@ -209,7 +209,7 @@ const postNewMeasurement = async function postNewMeasurement (req, res, next) {
209209
* Timestamp is optional. Do not submit a header.
210210
*
211211
* **JSON Array:**<br/>
212-
* You can submit your data as array. Your measurements should be objects with the keys `sensor`, `value` and optionally `createdAt` and `location`. Specify the header `content-type: application/json`.
212+
* You can submit your data as array. Your measurements should be objects with the keys `sensor`, `value` and optionally `createdAt` and `location`. Specify the header `content-type: application/json`. If Location Values are posted, the Timestamp becomes obligatory.
213213
*
214214
* **JSON Object:**<br/>
215215
* The third form is to encode your measurements in an object. Here, the keys of the object are the sensorIds, the values of the object are either just the `value` of your measurement or an array of the form `[value, createdAt, location]`, where the latter two values are optional.

0 commit comments

Comments
 (0)