caTUstrophy / backend

Backend part for our catastrophe aid tool. Written in Go.
GNU General Public License v3.0
6 stars 3 forks source link

Create User behaves strange #78

Closed nielsrolf closed 8 years ago

nielsrolf commented 8 years ago

The following request to POST /users fails unexpectedly:

Request:

{
    "Name": "Alexandra Maria Namia",
    "PreferredName": "alex",
    "Mail": "alexandra1.m.namia@example.com",
    "PhoneNumbers": [
        "012012312373",
    ],
    "Password": "WhyNotSafe1337Worlds?"
}
Response:
{"Error":"Supplied values in JSON body could not be parsed"}
numbleroot commented 8 years ago

You receive that response because the supplied JSON is invalid. The phone number in the PhoneNumbers array should not have a trailing comma after it.

Works without the comma.