maproulette-backend
maproulette-backend copied to clipboard
setting task location through task API silently fails
Posting the JSON below to /api/v2/tasks
silently fails with
WARN - Invalid json for type: {"obj.location":[{"msg":["error.expected.jsstring"],"args":[]}]}
on the console.
[
{
"name": "ExampleTask",
"identifier": "Custom_Identifier",
"parent": 2,
"instruction": "Task instruction",
"geometries": {
"type": "FeatureCollection",
"features":
[{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [77.6255107,40.5872232]
},
"properties": {}
}]
},
"location": {"type":"Point","coordinates":[77.6255107,40.5872232]},
"status": 0
}
]