using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace WK_KLI_LAPS_Service.Controllers.ReleaseNotes
{
    [ApiController]
    [Route("api/[controller]")]
    public class ReleaseNotesApiController : ControllerBase
    {
        private IReleaseNotesService _ReleaseNotesService;
        public ReleaseNotesApiController(IReleaseNotesService ReleaseNotesService)
        { _ReleaseNotesService = ReleaseNotesService; }

        [Authorize]
        [HttpGet("GetReleaseNotes")]
        public IActionResult GetReleaseNotes()
        {
            try
            {
                var _helpDeskList = _ReleaseNotesService.GetReleaseNotes();
                return Ok(_helpDeskList);
            }
            catch (Exception)
            {
                return BadRequest("Not able to get ReleaseNotes Data");
            }

        }
    }
}
