Better verbosity for API
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user