File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,24 +50,20 @@ pub async fn _send_groups_to_cis(
5050 let mut update_profile = Profile :: default ( ) ;
5151 update_profile. access_information . mozilliansorg = profile. access_information . mozilliansorg ;
5252 update_profile. active = profile. active ;
53- match update_groups_and_sign (
53+ update_groups_and_sign (
5454 & mut update_profile. access_information . mozilliansorg ,
5555 groups,
5656 cis_client. get_secret_store ( ) ,
5757 now,
58- ) {
59- Ok ( _) => {
60- if let Some ( user_id) = profile. user_id . value . clone ( ) {
61- cis_client
62- . update_user ( & user_id, update_profile)
63- . map_ok ( |_| ( ) )
64- . await
65- } else {
66- Err ( format_err ! ( "invalid user_id" ) )
67- }
68- }
69- Err ( e) => Err ( e) ,
70- }
58+ ) ?;
59+ let Some ( user_id) = profile. user_id . value . clone ( ) else {
60+ return Err ( format_err ! ( "invalid user_id" ) ) ;
61+ } ;
62+ cis_client
63+ . update_user ( & user_id, update_profile)
64+ . await
65+ . map ( |_| ( ) )
66+ . map_err ( Error :: from)
7167}
7268
7369pub async fn send_groups_to_cis (
You can’t perform that action at this time.
0 commit comments