mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-24 00:52:23 -04:00
28 lines
740 B
C#
28 lines
740 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using API.Data;
|
|
using API.DTOs;
|
|
using API.Interfaces;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace API.Controllers
|
|
{
|
|
public class UsersController : BaseApiController
|
|
{
|
|
private readonly DataContext _context;
|
|
private readonly IUserRepository _userRepository;
|
|
|
|
public UsersController(DataContext context, IUserRepository userRepository)
|
|
{
|
|
_context = context;
|
|
_userRepository = userRepository;
|
|
}
|
|
|
|
[HttpGet]
|
|
public async Task<ActionResult<IEnumerable<MemberDto>>> GetUsers()
|
|
{
|
|
return Ok(await _userRepository.GetMembersAsync());
|
|
}
|
|
}
|
|
} |