diff --git a/src/main/kotlin/controller/api/AudioApiController.kt b/src/main/kotlin/controller/api/AudioApiController.kt index fe26b9f..6530669 100644 --- a/src/main/kotlin/controller/api/AudioApiController.kt +++ b/src/main/kotlin/controller/api/AudioApiController.kt @@ -22,7 +22,6 @@ private const val PAGE_LIMIT = 50 } - // TODO 複数キーワード対応 @GetMapping fun getAudioList( @RequestParam("audio", required = false) audioName: String?, @@ -48,7 +47,7 @@ fun updateHistory( @PathVariable("slug") slug: String ): ResponseEntity { - audioService.updateHistory(slug) + audioService.updateHistory(slug, PAGE_LIMIT) return ResponseEntity.ok(null) } @@ -60,4 +59,12 @@ audioService.update(slug, request) return ResponseEntity.ok(null) } + + @DeleteMapping("{slug}") + fun deleteAudio( + @PathVariable("slug") slug: String + ): ResponseEntity { + audioService.delete(slug) + return ResponseEntity.ok(null) + } } \ No newline at end of file