working #39
@@ -16,15 +16,12 @@ namespace BoredCareers.Controllers {
|
|||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IActionResult> GetCompany(int CompanyID) {
|
public async Task<IActionResult> GetCompany(int CompanyID) {
|
||||||
if (isLoggedIn()) {
|
Company? company = await _databaseService.GetCompany(CompanyID);
|
||||||
Company? company = await _databaseService.GetCompany(CompanyID);
|
if (company != null) {
|
||||||
if (company != null) {
|
company.EmailToken = "";
|
||||||
company.EmailToken = "";
|
return Ok(company);
|
||||||
return Ok(company);
|
|
||||||
}
|
|
||||||
return NotFound("Company doesn't exist");
|
|
||||||
}
|
}
|
||||||
return NotFound("Not logged in");
|
return NotFound("Company doesn't exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
Reference in New Issue
Block a user