Page MenuHomePhabricator

D10980.id37608.diff
No OneTemporary

D10980.id37608.diff

diff --git a/services/identity/src/websockets/mod.rs b/services/identity/src/websockets/mod.rs
--- a/services/identity/src/websockets/mod.rs
+++ b/services/identity/src/websockets/mod.rs
@@ -11,7 +11,7 @@
use hyper_tungstenite::HyperWebsocket;
use identity_search_messages::{
ConnectionInitializationResponse, ConnectionInitializationStatus, Heartbeat,
- IdentitySearchQuery, IdentitySearchResult, IdentitySearchUser, Messages,
+ IdentitySearchMethod, IdentitySearchResult, IdentitySearchUser, Messages,
};
use serde::{Deserialize, Serialize};
use tokio::net::TcpListener;
@@ -183,8 +183,8 @@
Ok(())
}
Messages::IdentitySearchQuery(search_request) => {
- let search_result = match search_request {
- IdentitySearchQuery::IdentitySearchPrefix(prefix_request) => {
+ let search_result = match search_request.search_method {
+ IdentitySearchMethod::IdentitySearchPrefix(prefix_request) => {
handle_prefix_search(&prefix_request.prefix).await
}
}?;
diff --git a/shared/identity_search_messages/src/messages/search_query.rs b/shared/identity_search_messages/src/messages/search_query.rs
--- a/shared/identity_search_messages/src/messages/search_query.rs
+++ b/shared/identity_search_messages/src/messages/search_query.rs
@@ -9,6 +9,12 @@
#[derive(Debug, Serialize, Deserialize)]
#[serde(tag = "type")]
-pub enum IdentitySearchQuery {
+pub enum IdentitySearchMethod {
IdentitySearchPrefix(IdentitySearchPrefix),
}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(tag = "type", rename_all = "camelCase")]
+pub struct IdentitySearchQuery {
+ pub search_method: IdentitySearchMethod,
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 5:42 AM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2671697
Default Alt Text
D10980.id37608.diff (1 KB)

Event Timeline