Skip to content
Snippets Groups Projects

reports

Merged Enzo Santangelo Dodera requested to merge feature/reports into develop
3 files
+ 23
16
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -64,15 +64,11 @@ namespace Tsi1.Api.Controllers
[Authorize(Roles = UserTypes.FacultyAdmin + ", " + UserTypes.UdelarAdmin)]
[HttpGet("GetAllGlobalSurveys")]
public async Task<IActionResult> GetAllGlobalSurveys(int tenantId)
public async Task<IActionResult> GetAllGlobalSurveys()
{
var userType = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.Role).Value;
if (userType == UserTypes.FacultyAdmin)
{
tenantId = int.Parse(HttpContext.User.Claims.FirstOrDefault(x => x.Type == "TenantId").Value);
}
var result = await _surveyService.GetAllGlobalSurveys(tenantId, userType);
var tenantId = int.Parse(HttpContext.User.Claims.FirstOrDefault(x => x.Type == "TenantId").Value);
var result = await _surveyService.GetAllGlobalSurveys(tenantId);
if (result.HasError)
{
Loading