Better verbosity for API

This commit is contained in:
2025-07-18 19:56:09 -07:00
parent d8762408d4
commit ce24ea478d
2 changed files with 14 additions and 8 deletions
@@ -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");
}
}