using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Persistence.Database.Model; using Persistence.Models; using Persistence.Repositories; namespace Persistence.API.Controllers; [ApiController] [Authorize] [Route("api/[controller]")] public class ChangeLogController : ControllerBase, IChangeLogApi> where TDto : class, IChangeLogDto, new() { private IChangeLogRepository> repository; public ChangeLogController(IChangeLogRepository> repository) { this.repository = repository; } [HttpPost] public async Task> Add(TDto dto, CancellationToken token) { var userId = User.GetUserId(); var result = await repository.InsertRange(userId, [dto], token); return Ok(result); } [HttpPost("range")] public Task> AddRange(IEnumerable dtos, CancellationToken token) { throw new NotImplementedException(); } [HttpDelete] public Task> Delete(int id, CancellationToken token) { throw new NotImplementedException(); } [HttpDelete("range")] public Task> DeleteRange(IEnumerable ids, CancellationToken token) { throw new NotImplementedException(); } [HttpGet] public Task>> GetChangeLogCurrent(CancellationToken token) { throw new NotImplementedException(); } [HttpGet("history")] public Task>>> GetChangeLogForDate(DateTimeOffset historyMoment, CancellationToken token) { throw new NotImplementedException(); } [HttpPut] public Task> Update(TDto dto, CancellationToken token) { throw new NotImplementedException(); } [HttpPut("range")] public Task> UpdateRange(IEnumerable dtos, CancellationToken token) { throw new NotImplementedException(); } }