Change employee to a left join
This commit is contained in:
@@ -29,6 +29,10 @@ namespace BoredCareers.Controllers {
|
||||
Company? test = await _databaseService.GetCompany(company.ID);
|
||||
if (test == null) {
|
||||
await _databaseService.SetCompany(company);
|
||||
await _databaseService.SetEmployee(new Employee() {
|
||||
AccountID = getLoggedInUserID(),
|
||||
Company = company
|
||||
});
|
||||
return Ok();
|
||||
}
|
||||
return NotFound("The company already exists");
|
||||
|
||||
Reference in New Issue
Block a user