viralemergence / pharos-api

MIT License
0 stars 0 forks source link

`create_user` should be named `update_user` and needs to update, not overwrite, the user data. #49

Open ryan-talus opened 1 year ago

ryan-talus commented 1 year ago

Currently calls USERS_TABLE.put_item() and should be USERS_TABLE.update_item().

As it is right now, a client with out of date data could save the wrong projects array, making a user's projects potentially "disappear".

ryan-talus commented 1 year ago

https://github.com/talus-analytics-bus/pharos-api/blob/762171e508980fa1092cb96f1d7ef8aaba6d2906/src/lambda/create_user/app.py#L21

ryan-talus commented 1 year ago

This also needs to have the ability to create users removed and moved to a separate function