Skip to content

Instantly share code, notes, and snippets.

@DeebiKaaRaviSankar
Created August 19, 2022 05:56
Show Gist options
  • Select an option

  • Save DeebiKaaRaviSankar/4c1265c6a49d45a5942d0a22fffa14fd to your computer and use it in GitHub Desktop.

Select an option

Save DeebiKaaRaviSankar/4c1265c6a49d45a5942d0a22fffa14fd to your computer and use it in GitHub Desktop.
[HttpGet(DbConstants.Route_Get)]
public async Task<IActionResult> GetPostJob()
{
_user_id = _controllerService.GetUserId(HttpContext);
_postJobDTOs = await _postJobRepo.GetPostJobs(user_id: _user_id);
return await Task.FromResult(Ok(_postJobDTOs));
}
// Route: post_job/get
[Authorize(Roles = DbConstants.Role_Employer + "," + DbConstants.Role_JobSeeker)]
[HttpGet(DbConstants.Route_Get + "/{id}")]
public async Task<IActionResult> GetPostJob(int id)
{
postJobResponseDTO = await _postJobRepo.GetPostJobByID(id);
return await Task.FromResult(Ok(postJobResponseDTO));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment