1111
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using LiveRecorder.Application.Abstractions.Logging;
|
||||
using LiveRecorder.Application.Models.Logs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LiveRecorder.WebApi.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/logs")]
|
||||
public sealed class LogsController : ControllerBase
|
||||
{
|
||||
private readonly ISystemLogService _systemLogService;
|
||||
|
||||
public LogsController(ISystemLogService systemLogService)
|
||||
{
|
||||
_systemLogService = systemLogService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IReadOnlyList<SystemLogDto>>> List(
|
||||
[FromQuery] Guid? liveRoomId,
|
||||
[FromQuery] Guid? recordSessionId,
|
||||
[FromQuery] Guid? recordTaskId,
|
||||
[FromQuery] int take = 200,
|
||||
CancellationToken cancellationToken = default) =>
|
||||
Ok(await _systemLogService.ListAsync(liveRoomId, recordSessionId, recordTaskId, take, cancellationToken));
|
||||
}
|
||||
Reference in New Issue
Block a user