Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3512943
D5570.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
775 B
Referenced Files
None
Subscribers
None
D5570.diff
View Options
diff --git a/services/identity/src/service.rs b/services/identity/src/service.rs
--- a/services/identity/src/service.rs
+++ b/services/identity/src/service.rs
@@ -383,7 +383,18 @@
&self,
request: Request<GetUserPublicKeyRequest>,
) -> Result<Response<GetUserPublicKeyResponse>, Status> {
- unimplemented!()
+ let message = request.into_inner();
+ let public_key = match self
+ .client
+ .get_user_public_key(message.user_id, message.device_id)
+ .await
+ {
+ Ok(Some(public_key)) => public_key,
+ Ok(None) => return Err(Status::not_found("no public key found")),
+ Err(e) => return Err(handle_db_error(e)),
+ };
+ let response = Response::new(GetUserPublicKeyResponse { public_key });
+ Ok(response)
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 9:12 PM (17 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2692662
Default Alt Text
D5570.diff (775 B)
Attached To
Mode
D5570: [services][identity] implement get_user_public_key service method
Attached
Detach File
Event Timeline
Log In to Comment