diff --git a/services/identity/src/database.rs b/services/identity/src/database.rs --- a/services/identity/src/database.rs +++ b/services/identity/src/database.rs @@ -199,6 +199,24 @@ .await .map_err(|e| Error::AwsSdk(e.into())) } + + async fn update_users_table( + &self, + user_id: String, + update_expression: impl Into, + expression_attribute_values: HashMap, + ) -> Result { + self + .client + .update_item() + .table_name(PAKE_USERS_TABLE) + .key(PAKE_USERS_TABLE_PARTITION_KEY, AttributeValue::S(user_id)) + .update_expression(update_expression) + .set_expression_attribute_values(Some(expression_attribute_values)) + .send() + .await + .map_err(|e| Error::AwsSdk(e.into())) + } } #[derive(