Merge branch 'main' of git.ai.ssau.ru:myoffice/linux_tasks into main

pull/5/head
Vladimir Protsenko 12 months ago
commit 680dc0a836

@ -50,6 +50,8 @@ namespace TodoApi.Controllers
q = q.Take(Math.Min(t, MaxResultCount));
}
q = q.OrderBy(e => e.CreatedAt);
var result = new
{
Items = await q.ToArrayAsync(),
@ -72,12 +74,12 @@ namespace TodoApi.Controllers
await _db.SaveChangesAsync();
return Ok(todo);
}
[HttpPost("toggle")]
public async Task<IActionResult> Toggle(ToggleModel vm)
{
var now = DateTimeOffset.UtcNow;
await _db.Todos.Where(e => vm.Ids.Contains(e.Id))
.ExecuteUpdateAsync(setters =>
setters

Loading…
Cancel
Save