Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3486404
D10980.id37360.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
D10980.id37360.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 4:52 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2671697
Default Alt Text
D10980.id37360.diff (1 KB)
Attached To
Mode
D10980: [identity] [shared] Change search query enum to struct and introduce search method enum
Attached
Detach File
Event Timeline
Log In to Comment