using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using presence.domain.Models;
using presence.domain.UseCase;

namespace presence_api.Controllers.UserController;

[ApiController]
[Route("api/[controller]")]
public class UserController: ControllerBase
   {
      private readonly UserUseCase _userUseCase;

      public UserController(UserUseCase userUseCase)
      {
        _userUseCase = userUseCase;
      }

      [HttpGet]
      public ActionResult<IEnumerable<User>> GetAllUser()
      {
        return Ok(_userUseCase.GetAllUsers());
      }
   }