Change employee to a left join
This commit is contained in:
@@ -36,7 +36,7 @@ namespace BoredCareers.Controllers {
|
||||
}
|
||||
|
||||
public async Task<bool> isLoggedInUserEmployeeOf(int CompanyID) {
|
||||
Employee[] employees = await _databaseService.GetEmployees(CompanyID);
|
||||
Employee[] employees = await _databaseService.GetEmployeesFromCompany(CompanyID);
|
||||
foreach (Employee cur in employees) {
|
||||
if (getLoggedInUserID() == cur.AccountID) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user