-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: style to match cargo 1.72.0 (#278)
* Update README.md Signed-off-by: Agustina Aldasoro <[email protected]> * fix style * fix style --------- Signed-off-by: Agustina Aldasoro <[email protected]>
- Loading branch information
1 parent
29c9625
commit 2a93606
Showing
4 changed files
with
139 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
use crate::{domain::error::CommonError, friendships::UpdateFriendshipPayload}; | ||
|
||
pub fn get_synapse_token(request: UpdateFriendshipPayload) -> Result<String, CommonError> { | ||
let Some(auth_token) = request | ||
.auth_token | ||
.as_ref() else { | ||
log::error!("[RPC] Handle friendship update > `auth_token` is missing."); | ||
return Err(CommonError::Unauthorized("`auth_token` is missing".to_owned())); | ||
}; | ||
let Some(auth_token) = request.auth_token.as_ref() else { | ||
log::error!("[RPC] Handle friendship update > `auth_token` is missing."); | ||
return Err(CommonError::Unauthorized( | ||
"`auth_token` is missing".to_owned(), | ||
)); | ||
}; | ||
|
||
let Some(synapse_token) = auth_token | ||
.synapse_token | ||
.as_ref() else { | ||
log::error!("[RPC] Handle friendship update > `synapse_token` is missing."); | ||
return Err(CommonError::Unauthorized("`synapse_token` is missing".to_owned())) | ||
}; | ||
let Some(synapse_token) = auth_token.synapse_token.as_ref() else { | ||
log::error!("[RPC] Handle friendship update > `synapse_token` is missing."); | ||
return Err(CommonError::Unauthorized( | ||
"`synapse_token` is missing".to_owned(), | ||
)); | ||
}; | ||
Ok(synapse_token.to_string()) | ||
} |