using Microsoft.AspNetCore.Mvc;
using Microsoft.VisualBasic;
using noteApi.Interfaces;

namespace noteApi.Controllers
{
    [Route("api/status")]
    [ApiController]
    public class StatusController : ControllerBase
    {
        public readonly INoteRepository _noteRepo;
        public StatusController(INoteRepository noteRepository)
        {
            _noteRepo = noteRepository;
        }

        [HttpGet]
        public async Task<IActionResult> Get()
        {
            try
            {
                var stock = await _noteRepo.GetAllAsync();

                return Ok();
            }
            catch (Exception ex)
            {
                return StatusCode(503);
            }
        }
    }
}
