public IActionResult GetAccounts() { var list = from account in accounts.NotDeleted where Permissions.AccessAccount(account) select account; return(Ok(list)); }
public IActionResult GetAccount(Guid id) { if (!accounts.Find(id, out var acc)) { return(NotFound()); } if (!Permissions.AccessAccount(acc)) { return(NotFound()); } return(Ok(acc)); }