[HttpGet("{id:guid}", Name = "GetUrlaubsantragById")]
[ProducesResponseType(typeof(UrlaubsantragDto), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetUrlaubsantragById([FromRoute] Guid id)
{
var result = await _urlaubsantragService.GetUrlaubsantragAsync(id);
if (result == null)
{
return NotFound();
}
return Ok(result);
}
[HttpGet("{id:guid}", Name = "GetUrlaubsantragById")]
[ProducesResponseType(typeof(UrlaubsantragDto), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetUrlaubsantragById([FromRoute] Guid id)
{
var result = await _urlaubsantragService.GetUrlaubsantragAsync(id);
if (result == null)
{
return NotFound();
}
return Ok(result);
}