Правки в SlipsStatController

This commit is contained in:
Olga Nemt 2023-10-03 09:12:26 +05:00
parent a2502a8cf9
commit 83b1da7c9c

View File

@ -1,4 +1,5 @@
using AsbCloudApp.Data;
using AsbCloudApp.Exceptions;
using AsbCloudApp.Repositories;
using AsbCloudApp.Requests;
using AsbCloudDb.Model;
@ -39,9 +40,13 @@ namespace AsbCloudWebApi.Controllers
[FromQuery] OperationStatRequest request,
CancellationToken token)
{
var modal = await slipsAnalyticsService.GetAllAsync(request, token).ConfigureAwait(false);
var idUser = User.GetUserId();
return Ok(modal);
if (!idUser.HasValue)
throw new ForbidException("Не удается вас опознать");
var data = await slipsAnalyticsService.GetAllAsync(request, token).ConfigureAwait(false);
return Ok(data);
}
}
}