diff --git a/src/main/kotlin/controller/api/PlaylistApiController.kt b/src/main/kotlin/controller/api/PlaylistApiController.kt index bc26301..55598f2 100644 --- a/src/main/kotlin/controller/api/PlaylistApiController.kt +++ b/src/main/kotlin/controller/api/PlaylistApiController.kt @@ -12,6 +12,7 @@ import net.piedpiper.bremer.service.PlaylistService import org.springframework.beans.factory.annotation.Qualifier import org.springframework.http.ResponseEntity +import org.springframework.web.bind.annotation.DeleteMapping import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping @@ -47,6 +48,14 @@ return ResponseEntity.ok(null) } + @DeleteMapping("{slug}") + fun deletePlaylist( + @PathVariable("slug") slug: String + ): ResponseEntity { + playlistService.deletePlaylist(slug) + return ResponseEntity.ok(null) + } + @GetMapping("{slug}") fun getAudioList(@PathVariable("slug") slug: String): ResponseEntity = ResponseEntity.ok(playlistService.getPlaylist(slug))