-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from wafflestudio/develop
Merge develop to prod
- Loading branch information
Showing
42 changed files
with
1,009 additions
and
377 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/wafflestudio/csereal/core/academics/api/req/CreateYearReq.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wafflestudio.csereal.core.academics.api.req | ||
|
||
data class CreateYearReq( | ||
val year: Int, | ||
val name: String, | ||
val description: String | ||
) |
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/com/wafflestudio/csereal/core/academics/api/req/UpdateYearReq.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.wafflestudio.csereal.core.academics.api.req | ||
|
||
data class UpdateYearReq( | ||
val description: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/kotlin/com/wafflestudio/csereal/core/academics/api/v2/AcademicsController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.wafflestudio.csereal.core.academics.api.v2 | ||
|
||
import com.wafflestudio.csereal.common.aop.AuthenticatedStaff | ||
import com.wafflestudio.csereal.core.academics.dto.GroupedCourseDto | ||
import com.wafflestudio.csereal.core.academics.service.AcademicsService | ||
import jakarta.validation.Valid | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@RequestMapping("/api/v2/academics") | ||
@RestController | ||
class AcademicsController( | ||
private val academicsService: AcademicsService | ||
) { | ||
@AuthenticatedStaff | ||
@PostMapping("/courses") | ||
fun createCourse( | ||
@Valid | ||
@RequestBody | ||
request: GroupedCourseDto | ||
) = academicsService.createCourse(request) | ||
|
||
@GetMapping("/courses") | ||
fun readAllGroupedCourses(@RequestParam studentType: String): List<GroupedCourseDto> = | ||
academicsService.readAllGroupedCourses(studentType) | ||
|
||
@AuthenticatedStaff | ||
@PutMapping("/courses") | ||
fun updateCourse(@RequestBody updateRequest: GroupedCourseDto) = academicsService.updateCourse(updateRequest) | ||
|
||
@AuthenticatedStaff | ||
@DeleteMapping("/courses/{code}") | ||
fun deleteCourse(@PathVariable code: String) = academicsService.deleteCourse(code) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/kotlin/com/wafflestudio/csereal/core/academics/database/AcademicsPostType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.