Skip to content

Commit

Permalink
fix : (#18) Update controller name change
Browse files Browse the repository at this point in the history
  • Loading branch information
qkrwndnjs1075 committed Jan 8, 2025
1 parent ec034fe commit e5a072a
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class ReportController(
}

// Retrieve a single report by ID
@GetMapping("/{id}")
@GetMapping("/{reportId}")
fun getReport(
@PathVariable id: Long,
@PathVariable reportId: Long,
): ReportQueryResponse {
return reportQueryService.getReport(id)
return reportQueryService.getReport(reportId)
}

// Retrieve all reports
Expand All @@ -52,21 +52,21 @@ class ReportController(
}

// Update an existing report
@PatchMapping("/{id}")
@PatchMapping("/{reportId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
fun updateReport(
@PathVariable id: Long,
@PathVariable reportId: Long,
@RequestBody command: UpdateReportCommand,
) {
updateReportService.updateReport(id, command)
updateReportService.updateReport(reportId, command)
}

// Delete a report by ID
@DeleteMapping("/{id}")
@DeleteMapping("/{reportId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
fun deleteReport(
@PathVariable id: Long,
@PathVariable reportId: Long,
) {
deleteReportService.deleteReport(id)
deleteReportService.deleteReport(reportId)
}
}

0 comments on commit e5a072a

Please sign in to comment.