Irvin Blais rock!
This commit is contained in:
1 parent
f2c6c8d65c
commit
0d0337a6aa
17 files changed
+175
-39
No files matched your search
@@ -38,14 +38,8 @@ impl AccountService<'_> {
|
||||
AccountService{conn}
|
||||
}
|
||||
|
||||
pub fn get_user_accounts(& self, user_id: String) -> CustomResult<Vec<AccountDTO>>{
|
||||
let p = UserId::from_string(&user_id);
|
||||
if p.is_none() {
|
||||
let msg = format!("{} is an invalid user id.", &user_id);
|
||||
return Err(Error::UserInputError(msg));
|
||||
}
|
||||
|
||||
let ret = list_user_accounts(&self.conn, &p.unwrap())?;
|
||||
pub fn get_user_accounts(& self, user_id: &UserId) -> CustomResult<Vec<AccountDTO>>{
|
||||
let ret = list_user_accounts(&self.conn, user_id)?;
|
||||
Ok(ret.iter().map(AccountDTO::from_entity).collect())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user