lamanchy / bis

0 stars 1 forks source link

Issues with /api/frontend/users/ endpoints #14

Open mrkvon opened 1 year ago

mrkvon commented 1 year ago

Reporting:

When we try to POST or PATCH user with empty email i.e. { "email": "" }, it fails with 500.

When we try to PATCH user's address, i.e. PATCH /api/frontend/users/:id/ with body

{
    "address": {
        "street": "Street 1",
        "city": "City",
        "zip_code": "asdf",
        "region": 5
    }
}

the region is ignored and doesn't get saved. Other address fields get saved as expected. The same happens with POST: Region stays null.

@lamanchy

lamanchy commented 1 year ago

@mrkvon region is automatically determined from zip code, therefore I should probably mark is as readonly, so it's not confusing.

will fix the email