UI #4
@@ -16,7 +16,7 @@ namespace BoredCareers.Controllers {
|
||||
if (jobListing != null) {
|
||||
return Ok(jobListing);
|
||||
}
|
||||
return NotFound();
|
||||
return NotFound("Job listing not found");
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -32,8 +32,9 @@ namespace BoredCareers.Controllers {
|
||||
await _databaseService.SetJobListing(JobListing);
|
||||
return Ok();
|
||||
}
|
||||
return NotFound("You are not an employee of company");
|
||||
}
|
||||
return NotFound();
|
||||
return NotFound("Not logged in");
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
@@ -45,9 +46,11 @@ namespace BoredCareers.Controllers {
|
||||
await _databaseService.DeleteJobListing(JobListingID);
|
||||
return Ok();
|
||||
}
|
||||
return NotFound("You are not an employee of company");
|
||||
}
|
||||
return NotFound("Job listing doesn't exist already");
|
||||
}
|
||||
return NotFound();
|
||||
return NotFound("Not logged in");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,14 +17,15 @@ namespace BoredCareers.Controllers {
|
||||
if (resume != null) {
|
||||
return Ok(resume);
|
||||
}
|
||||
return NotFound("Unable to find resume");
|
||||
} else {
|
||||
if (isLoggedIn()) {
|
||||
int accountID = getLoggedInUserID();
|
||||
Resume[] resumes = await _databaseService.GetResumes(accountID);
|
||||
return Ok(resumes);
|
||||
}
|
||||
return NotFound("Not logged in");
|
||||
}
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -35,8 +36,9 @@ namespace BoredCareers.Controllers {
|
||||
await _databaseService.SetResume(resume);
|
||||
return Ok();
|
||||
}
|
||||
return NotFound("Resume doesn't exist or you are not the owner");
|
||||
}
|
||||
return NotFound();
|
||||
return NotFound("Not logged in");
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
@@ -48,8 +50,9 @@ namespace BoredCareers.Controllers {
|
||||
await _databaseService.DeleteResume(ResumeID);
|
||||
return Ok();
|
||||
}
|
||||
return NotFound("Resume doesn't exist or you are not the owner");
|
||||
}
|
||||
return NotFound();
|
||||
return NotFound("Not logged in");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user