@@ -4,10 +4,7 @@ use crate::apis::org_service_api::{
44 DisallowSamlParams , FetchOrgParams , FetchOrgsByQueryParams , FetchUsersInOrgParams ,
55 RemoveUserFromOrgParams , UpdateOrgParams ,
66} ;
7- use crate :: models:: {
8- AddUserToOrgRequest , ChangeUserRoleInOrgRequest , CreateOrgRequest , CreateOrgResponse ,
9- FetchOrgsResponse , RemoveUserFromOrgRequest , UpdateOrgRequest , UserPagedResponse ,
10- } ;
7+ use crate :: models:: { AddUserToOrgRequest , ChangeUserRoleInOrgRequest , CreateOrgRequest , CreateOrgResponse , FetchOrgResponse , FetchOrgsResponse , RemoveUserFromOrgRequest , UpdateOrgRequest , UserPagedResponse } ;
118use crate :: propelauth:: errors:: {
129 CreateOrgError , ErrorsWithNotFound , FetchOrgsByQueryError , FetchUsersInOrgError ,
1310 OrgMissingOrRoleError , UpdateOrgError ,
@@ -20,7 +17,7 @@ pub struct OrgService<'a> {
2017
2118impl OrgService < ' _ > {
2219 /// Fetch an organization by it's ID
23- pub async fn fetch_org ( & self , org_id : String ) -> Result < ( ) , ErrorsWithNotFound > {
20+ pub async fn fetch_org ( & self , org_id : String ) -> Result < FetchOrgResponse , ErrorsWithNotFound > {
2421 if !is_valid_id ( & org_id) {
2522 return Err ( ErrorsWithNotFound :: NotFound ) ;
2623 }
@@ -38,8 +35,7 @@ impl OrgService<'_> {
3835 _ => ErrorsWithNotFound :: UnexpectedException ,
3936 } ,
4037 )
41- } ) ?;
42- Ok ( ( ) )
38+ } )
4339 }
4440
4541 /// Fetch and page over organizations
0 commit comments