Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LabraCORE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
LabraCORE
Merge requests
!239
Add query endpoints for courses
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Add query endpoints for courses
add-query-endpoints-for-course
into
development
Overview
3
Commits
11
Pipelines
29
Changes
14
Merged
Add query endpoints for courses
Cédric Willekens
requested to merge
add-query-endpoints-for-course
into
development
10 months ago
Overview
3
Commits
11
Pipelines
29
Changes
14
closes
#164 (closed)
Edited
10 months ago
by
Cédric Willekens
0
0
Merge request reports
Compare
development
version 13
4258c9f5
10 months ago
version 12
1f1ef5c3
10 months ago
version 11
1390733d
10 months ago
version 10
a845e22e
10 months ago
version 9
40bbe0eb
10 months ago
version 8
794a7bb6
10 months ago
version 7
8c6b07ba
10 months ago
version 6
80c0a633
10 months ago
version 5
a200b3d7
10 months ago
version 4
e784a73c
10 months ago
version 3
19c4dec2
10 months ago
version 2
602c4d23
10 months ago
version 1
a39adccc
10 months ago
development (base)
and
latest version
latest version
d5e38ba1
11 commits,
10 months ago
version 13
4258c9f5
11 commits,
10 months ago
version 12
1f1ef5c3
10 commits,
10 months ago
version 11
1390733d
9 commits,
10 months ago
version 10
a845e22e
8 commits,
10 months ago
version 9
40bbe0eb
7 commits,
10 months ago
version 8
794a7bb6
7 commits,
10 months ago
version 7
8c6b07ba
6 commits,
10 months ago
version 6
80c0a633
5 commits,
10 months ago
version 5
a200b3d7
4 commits,
10 months ago
version 4
e784a73c
3 commits,
10 months ago
version 3
19c4dec2
3 commits,
10 months ago
version 2
602c4d23
2 commits,
10 months ago
version 1
a39adccc
1 commit,
10 months ago
14 files
+
325
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
src/main/java/nl/tudelft/labracore/controller/CourseController.java
+
21
−
0
View file @ d5e38ba1
Edit in single-file editor
Open in Web IDE
Show full file
@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
import
jakarta.transaction.Transactional
;
import
nl.tudelft.labracore.dto.create.CourseCreateDTO
;
import
nl.tudelft.labracore.dto.create.CourseWithManagerCreateDTO
;
import
nl.tudelft.labracore.dto.patch.CoursePatchDTO
;
import
nl.tudelft.labracore.dto.view.structured.details.CourseDetailsDTO
;
import
nl.tudelft.labracore.dto.view.structured.summary.CourseSummaryDTO
;
@@ -157,4 +158,24 @@ public class CourseController {
public
void
deleteCourse
(
@PathVariable
Long
id
)
{
cr
.
deleteById
(
id
);
}
/**
* Query course by course code
*/
@GetMapping
(
"/by-course-code"
)
public
CourseSummaryDTO
queryCourseByCourseCode
(
@RequestParam
String
code
)
{
return
cs
.
getCourseByCourseCode
(
code
);
}
/**
* Setup or patch a course for which we know the user is a manager based on the tudelft api.
*
* @param dto A dto with a manager related to the course based on the tudelft api.
* @return The id of the course.
*/
@PreAuthorize
(
"@tuDelftApiService.validateManagerInDTO(dto)"
)
@PostMapping
(
"/setup-course-with-manager"
)
public
Long
setupCourseWithManager
(
@RequestBody
CourseWithManagerCreateDTO
dto
)
{
return
cs
.
setupCourse
(
dto
);
}
}
Loading