presence_new/presence_api/Controllers/UserController/UserController.cs

27 lines
633 B
C#
Raw Normal View History

2024-11-16 14:13:06 +00:00
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());
}
}