👔 Adjust lookup account logic
This commit is contained in:
@@ -58,7 +58,9 @@ public class AccountService(
|
|||||||
if (account is not null) return account;
|
if (account is not null) return account;
|
||||||
|
|
||||||
var contact = await db.AccountContacts
|
var contact = await db.AccountContacts
|
||||||
.Where(c => c.Content == probe)
|
.Where(c => c.Type == Shared.Models.AccountContactType.Email ||
|
||||||
|
c.Type == Shared.Models.AccountContactType.PhoneNumber)
|
||||||
|
.Where(c => EF.Functions.ILike(c.Content, probe))
|
||||||
.Include(c => c.Account)
|
.Include(c => c.Account)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
return contact?.Account;
|
return contact?.Account;
|
||||||
|
|||||||
Reference in New Issue
Block a user