HomePhabricator
Diffusion Comm 4056492d67e3

[services] use client update_item method instead of put_item for registration…

Description

[services] use client update_item method instead of put_item for registration data

Summary:
We can no longer use put_item to store pake registration data in the DDB table since we're generalizing it to store other user data (see previous diff). put_item will rewrite the item if it exists, but we just want to update the registration data in this function. The SET expression makes sure that only the registration attribute is updated.

Reference: https://docs.rs/aws-sdk-dynamodb/latest/aws_sdk_dynamodb/client/fluent_builders/struct.UpdateItem.html#

Depends on D4562

Test Plan: Confirmed that only the registration attribute is updated and other attributes remain the same in the DDB table

Reviewers: palys-swm, karol-bisztyga

Reviewed By: palys-swm, karol-bisztyga

Subscribers: ashoat, Adrian, atul, yayabosh

Differential Revision: https://phab.comm.dev/D4561

Details

Provenance
varunAuthored on Jul 18 2022, 1:43 PM
Reviewer
tomek
Differential Revision
D4561: [services] use client update_item method instead of put_item for registration data
Parents
rCOMM8d3f3967f622: [services] helper to update the users table
Branches
Unknown
Tags
Unknown