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 { private IChangeLogRepository repository; public ChangeLogController(IChangeLogRepository repository) { this.repository = repository; } [HttpPost] public async Task> Add( [FromRoute] Guid idDiscriminator, [FromBody]IDictionary dtos, CancellationToken token) { var userId = User.GetUserId(); var result = await repository.InsertRange(userId, idDiscriminator, [dtos], 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(); } public Task>>>> GetChangeLogForDate(DateTimeOffset historyMoment, CancellationToken token) { throw new NotImplementedException(); } //[HttpGet("history")] //public Task>>>> GetChangeLogForDate(DateTimeOffset historyMoment, CancellationToken token) //{ // throw new NotImplementedException(); //} [HttpPut] public Task> Update(IDictionary dto, CancellationToken token) { throw new NotImplementedException(); } [HttpPut("range")] public Task> UpdateRange(IEnumerable> dtos, CancellationToken token) { throw new NotImplementedException(); } }