File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
src/main/kotlin/site/billilge/api/backend/domain/rental/controller Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.ModelAttribute
1010import org.springframework.web.bind.annotation.PathVariable
1111import org.springframework.web.bind.annotation.RequestBody
1212import org.springframework.web.bind.annotation.RequestParam
13+ import site.billilge.api.backend.domain.rental.dto.request.AdminRentalHistoryRequest
1314import site.billilge.api.backend.domain.rental.dto.request.RentalStatusUpdateRequest
1415import site.billilge.api.backend.domain.rental.dto.response.AdminRentalHistoryFindAllResponse
1516import site.billilge.api.backend.domain.rental.dto.response.DashboardResponse
@@ -70,4 +71,34 @@ interface AdminRentalApi {
7071 @PathVariable rentalHistoryId : Long ,
7172 @RequestBody request : RentalStatusUpdateRequest
7273 ): ResponseEntity <Void >
74+
75+ @Operation(
76+ summary = " 대여 기록 추가 (관리자용)" ,
77+ description = " 임의로 대여 기록을 추가하는 관리자용 API"
78+ )
79+ @ApiResponses(
80+ value = [
81+ ApiResponse (
82+ responseCode = " 200" ,
83+ description = " 대여 기록 추가 성공"
84+ )
85+ ]
86+ )
87+ fun addRentalHistory (
88+ @RequestBody request : AdminRentalHistoryRequest
89+ ): ResponseEntity <Void >
90+
91+ @Operation(
92+ summary = " 대여 기록 삭제 (관리자용)" ,
93+ description = " 대여 기록을 임의로 삭제하는 관리자용 API"
94+ )
95+ @ApiResponses(
96+ value = [
97+ ApiResponse (
98+ responseCode = " 200" ,
99+ description = " 대여 기록 삭제 성공"
100+ )
101+ ]
102+ )
103+ fun deleteRentalHistory (@PathVariable rentalHistoryId : Long ): ResponseEntity <Void >
73104}
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ class AdminRentalController(
4747 }
4848
4949 @PostMapping
50- fun addRentalHistory (
50+ override fun addRentalHistory (
5151 @RequestBody request : AdminRentalHistoryRequest
5252 ): ResponseEntity <Void > {
5353 rentalService.createRentalByAdmin(request)
5454 return ResponseEntity .ok().build()
5555 }
5656
5757 @DeleteMapping(" /{rentalHistoryId}" )
58- fun deleteRentalHistory (@PathVariable rentalHistoryId : Long ): ResponseEntity <Void > {
58+ override fun deleteRentalHistory (@PathVariable rentalHistoryId : Long ): ResponseEntity <Void > {
5959 rentalService.deleteRentalHistory(rentalHistoryId)
6060 return ResponseEntity .ok().build()
6161 }
You can’t perform that action at this time.
0 commit comments