Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldb09 committed Mar 5, 2023
1 parent 0aed69b commit 3a3ee1c
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,5 @@ class AudioLoaderRestHandler(
return ResponseEntity.ok(DecodedTrack(rightOne.encoded, rightOne.info, rightOne.info))
}

@PostMapping(value = ["/decodetracks", "/v3/decodetracks"])
fun decodeTracks(@RequestBody encodedTracks: List<String>): ResponseEntity<List<Track?>> {
if (encodedTracks.isEmpty()) {
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "No tracks to decode provided")
}
return ResponseEntity.ok(encodedTracks.map {
val trackE = decodeTrack(audioPlayerManager, it) ?: throw ResponseStatusException(
HttpStatus.BAD_REQUEST,
"No track to decode provided"
)
val track = trackE
})
}

}

0 comments on commit 3a3ee1c

Please sign in to comment.