Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsi1-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rodrigo Sastre Marotta
tsi1-backend
Merge requests
!30
reports
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
reports
feature/reports
into
develop
Overview
0
Commits
2
Pipelines
0
Changes
3
Merged
Enzo Santangelo Dodera
requested to merge
feature/reports
into
develop
4 years ago
Overview
0
Commits
2
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Viewing commit
06e1692e
Prev
Next
Show latest version
3 files
+
23
−
16
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
06e1692e
surveys
· 06e1692e
esantangelo
authored
4 years ago
Tsi1.Api/Tsi1.Api/Controllers/SurveyController.cs
+
4
−
8
Options
@@ -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