Page MenuHomePhabricator

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

Authored by varun on Jul 18 2022, 1:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 2, 5:47 PM
Unknown Object (File)
Thu, Jan 2, 12:57 PM
Unknown Object (File)
Thu, Jan 2, 12:40 PM
Unknown Object (File)
Thu, Jan 2, 8:57 AM
Unknown Object (File)
Wed, Dec 25, 9:54 AM
Unknown Object (File)
Wed, Dec 25, 9:54 AM
Unknown Object (File)
Wed, Dec 25, 9:54 AM
Unknown Object (File)
Wed, Dec 25, 9:54 AM

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Jul 18 2022, 2:00 PM
This revision is now accepted and ready to land.Jul 19 2022, 1:42 AM