Kavita+ Overhaul & New Changelog (#3507)
This commit is contained in:
parent
d880c1690c
commit
a5707617f2
249 changed files with 14775 additions and 2300 deletions
26
API/Controllers/EmailController.cs
Normal file
26
API/Controllers/EmailController.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using API.Data;
|
||||
using API.DTOs.Email;
|
||||
using API.Helpers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Controllers;
|
||||
|
||||
[Authorize(Policy = "RequireAdminRole")]
|
||||
public class EmailController : BaseApiController
|
||||
{
|
||||
private readonly IUnitOfWork _unitOfWork;
|
||||
|
||||
public EmailController(IUnitOfWork unitOfWork)
|
||||
{
|
||||
_unitOfWork = unitOfWork;
|
||||
}
|
||||
|
||||
[HttpGet("all")]
|
||||
public async Task<ActionResult<IList<EmailHistoryDto>>> GetEmails()
|
||||
{
|
||||
return Ok(await _unitOfWork.EmailHistoryRepository.GetEmailDtos(UserParams.Default));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue