Skip to content

Commit

Permalink
feat: 시간표 조회 API 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
DWL21 committed Feb 3, 2025
1 parent 6a7deea commit 4cda897
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.yourssu.soongpt.domain.timetable.application

import com.yourssu.soongpt.common.business.dto.Response
import com.yourssu.soongpt.domain.timetable.business.TimetableService
import com.yourssu.soongpt.domain.timetable.business.dto.TimetableResponse
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/api/timetables")
class TimetableController(
private val timetableService: TimetableService,
) {
@GetMapping("/{id}")
fun getTimetable(@PathVariable id: Long): ResponseEntity<Response<TimetableResponse>> {
val response = timetableService.getTimeTable(id)
return ResponseEntity.ok(Response(result=response))
}
}

0 comments on commit 4cda897

Please sign in to comment.