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
!113
Update: Document the Project Api
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update: Document the Project Api
Topic/1115-docuProjectApi
into
Product/932-docuProjectApi
Overview
10
Commits
6
Pipelines
6
Changes
14
Merged
Theresia Rupprecht
requested to merge
Topic/1115-docuProjectApi
into
Product/932-docuProjectApi
4 years ago
Overview
10
Commits
6
Pipelines
6
Changes
14
Expand
coscine/issues#1115
Edited
4 years ago
by
Benedikt Heinrichs
0
0
Merge request reports
Compare
Product/932-docuProjectApi
version 5
bea6af9b
4 years ago
version 4
fd8ccfbf
4 years ago
version 3
797668ff
4 years ago
version 2
797668ff
4 years ago
version 1
10ab233a
4 years ago
Product/932-docuProjectApi (base)
and
latest version
latest version
fa377522
6 commits,
4 years ago
version 5
bea6af9b
5 commits,
4 years ago
version 4
fd8ccfbf
4 commits,
4 years ago
version 3
797668ff
2 commits,
4 years ago
version 2
797668ff
4 commits,
4 years ago
version 1
10ab233a
1 commit,
4 years ago
14 files
+
293
−
41
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
Search (e.g. *.vue) (Ctrl+P)
src/Project/Controllers/DisciplineController.cs
+
13
−
1
Options
@@ -2,22 +2,34 @@
using
Coscine.Database.ReturnObjects
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Mvc
;
using
System.Collections.Generic
;
using
System.Linq
;
namespace
Coscine.Api.Project.Controllers
{
/// <summary>
/// This controller represents the actions which can be taken with a discipline object.
/// </summary>
[
Authorize
]
public
class
DisciplineController
:
Controller
{
private
readonly
DisciplineModel
_disciplineModel
;
/// <summary>
/// DisciplineController constructor specifying a DisciplineModel
/// </summary>
public
DisciplineController
()
{
_disciplineModel
=
new
DisciplineModel
();
}
/// <summary>
/// Returns all available disciplines
/// </summary>
/// <returns>All Disciplines</returns>
[
Route
(
"[controller]"
)]
public
I
ActionResult
Index
()
public
ActionResult
<
IEnumerable
<
DisciplineObject
>>
Index
()
{
return
Json
(
_disciplineModel
.
GetAll
()
.
OrderBy
(
discipline
=>
discipline
.
DisplayNameDe
.
Substring
(
discipline
.
DisplayNameDe
.
Length
-
3
))
Loading