Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381963
D11679.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11679.diff
View Options
diff --git a/services/identity/src/database/one_time_keys.rs b/services/identity/src/database/one_time_keys.rs
--- a/services/identity/src/database/one_time_keys.rs
+++ b/services/identity/src/database/one_time_keys.rs
@@ -28,8 +28,8 @@
use super::DatabaseClient;
impl DatabaseClient {
- /// Will "mint" a single one-time key by attempting to successfully delete a
- /// key
+ /// Gets the next one-time key for the account and then, in a transaction,
+ /// deletes the key and updates the key count
pub(super) async fn get_one_time_key(
&self,
user_id: &str,
@@ -77,7 +77,7 @@
}
let query_result = self
- .get_one_time_keys(user_id, device_id, account_type)
+ .get_next_one_time_key(user_id, device_id, account_type)
.await?;
let mut items = query_result.items.unwrap_or_default();
let mut item = items.pop().unwrap_or_default();
@@ -152,7 +152,7 @@
}
}
- async fn get_one_time_keys(
+ async fn get_next_one_time_key(
&self,
user_id: &str,
device_id: &str,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 7:37 AM (22 h, 54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596333
Default Alt Text
D11679.diff (1 KB)
Attached To
Mode
D11679: [identity] rename otk db method
Attached
Detach File
Event Timeline
Log In to Comment