presence_new/presence_api/Controllers/UserController/UserController.cs
2024-11-16 17:13:06 +03:00

27 lines
633 B
C#

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());
}
}