Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
apis
Project
Merge requests
!17
New: Delete functionality for Projects and additional fields
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
New: Delete functionality for Projects and additional fields
Topic/261-NewProjectMetadata
into
Product/243-addEditProject
Overview
0
Commits
8
Pipelines
1
Changes
24
Merged
Benedikt Heinrichs
requested to merge
Topic/261-NewProjectMetadata
into
Product/243-addEditProject
5 years ago
Overview
0
Commits
8
Pipelines
1
Changes
24
Expand
coscine/issues#261
Edited
5 years ago
by
Benedikt Heinrichs
0
0
Merge request reports
Compare
Product/243-addEditProject
Product/243-addEditProject (base)
and
latest version
latest version
2deaedc7
8 commits,
5 years ago
24 files
+
717
−
33
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
24
Search (e.g. *.vue) (Ctrl+P)
src/Project/Controllers/DisciplineController.cs
0 → 100644
+
33
−
0
Options
using
Coscine.Api.Project.Models
;
using
Coscine.Api.Project.ReturnObjects
;
using
Coscine.ApiCommons
;
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Coscine.Api.Project.Controllers
{
public
class
DisciplineController
:
Controller
{
private
readonly
Authenticator
_authenticator
;
private
readonly
DisciplineModel
_disciplineModel
;
public
DisciplineController
()
{
_authenticator
=
new
Authenticator
(
this
,
Program
.
Configuration
);
_disciplineModel
=
new
DisciplineModel
();
}
[
Route
(
"[controller]"
)]
public
IActionResult
Index
()
{
return
Ok
(
_authenticator
.
ValidateAndExecute
((
user
)
=>
{
return
_disciplineModel
.
GetAll
().
Select
((
discipline
)
=>
new
DisciplineObject
(
discipline
.
Id
,
discipline
.
Url
,
discipline
.
DisplayName
));
}));
}
}
}
Loading