code4moldova / voluntar-web

Connecting volunteers with people in need COVID 19
https://dev.voluntar.md
Mozilla Public License 2.0
9 stars 10 forks source link

Add new demands is not working #223

Closed johnsmithm closed 3 years ago

johnsmithm commented 3 years ago

if we have an existing beneficiary add 'beneficiary' key to the payload with the value being the id of the existing beneficiary, otherwise add the beneficiary fields to the payload.


A dictionary representing the user request details.
        example1 {
                  "beneficiary": "123456",
                  "type":"grocery",
                  "status": "new",
                  "secret": "345%443$$",
                  "urgent": false,
                  "comments": "string",
                  "has_symptoms": false
                }
        example2 {
                  "beneficiary": "123456",
                  "type":"grocery",
                  "status": "new",
                  "secret": "345%443$$",
                  "urgent": false,
                  "comments": "string",
                  "has_symptoms": false,
                  "first_name": "str",
                  "last_name": "str",
                  "phone": "68633333",
                  "landline": "68338333",
                  "age": 60,
                  "zone": "botanica",
                  "address": "dacia"
                }