2
0
mirror of synced 2025-01-14 02:24:28 +00:00

29 lines
624 B
C#
Raw Normal View History

2024-09-11 12:08:06 +02:00
using Microsoft.AspNetCore.Mvc;
namespace AutoClientCenter.Controllers
{
[ApiController]
[Route("[controller]")]
public class ConfigController : ControllerBase
{
private readonly ITaskService taskService;
public ConfigController(ITaskService taskService)
{
this.taskService = taskService;
}
[HttpGet("Stats")]
public AcStats Get()
{
return taskService.GetStats();
}
[HttpPost("Set")]
public void Post([FromBody] AcTasks tasks)
{
taskService.SetConfig(tasks);
}
}
}