maproulette-backend icon indicating copy to clipboard operation
maproulette-backend copied to clipboard

setting task location through task API silently fails

Open mvexel opened this issue 8 years ago • 0 comments

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
    }
]

mvexel avatar Jun 09 '16 14:06 mvexel