GoodDollar / GoodServer

Backend to support the GoodDAPP
MIT License
13 stars 13 forks source link

(Bug) ongage email change fails #360

Closed sirpy closed 2 years ago

sirpy commented 2 years ago

search in logs for Request failed with status code 404 some failed because email is the same just different case, thats ok, already fixed. other email changes failed

johnsmith-gooddollar commented 2 years ago

@sirpy

why did they fail?

PUT /api/contacts/change_email had to be used, instead of POST.

johnsmith-gooddollar commented 2 years ago

hotfixed: https://github.com/GoodDollar/GoodServer/commit/dfffaaf96d963d9ad79a8df358fec38f5896ce73

johnsmith-gooddollar commented 2 years ago

@sirpy fields source_utm medium_utm had been added

johnsmith-gooddollar commented 2 years ago

@sirpy. Regarding point 2 - if try to set email from the other existing contact it fails:

image.png

Se we need to process this case separately

johnsmith-gooddollar commented 2 years ago

hotfixed: https://github.com/GoodDollar/GoodServer/commit/539ae2a3409013b0aba88c6f5154260d3d3db844

johnsmith-gooddollar commented 2 years ago

tested, pushed to PROD

sirpy commented 2 years ago

@johnsmith-gooddollar we need to take care of other accounts with the crmId you deleted. so that means that if another account exists already, then we should either

  1. simply modify the user crmId to the existing one and deleting his current crmId
  2. or search in our database for the user with the deleted crmId and switch it to the current user crmId
johnsmith-gooddollar commented 2 years ago

@sirpy in this case crmId will be shared between two users. is it ok ? Is this field unique in mongo DB ? Will update today

sirpy commented 2 years ago

yes users should share same crmId. no it is not defined unique

johnsmith-gooddollar commented 2 years ago

@sirpy done, tested on QA, hotfixed to prod