src/main/java/com/alibaba/intl/voddemo/controllers/VideosController.java
@RequestMapping(value = "/videos/{videoId}", method = RequestMethod.DELETE)
    public HttpStatus deleteVideoById(@PathVariable("videoId") String videoId) {
        LOGGER.info("Delete the video " + videoId + "...");

        var client = new DefaultAcsClient(clientProfile);
        var request = new DeleteVideoRequest();
        request.setVideoIds(videoId);

        try {
            client.getAcsResponse(request);
            return HttpStatus.OK;

        } catch (ClientException e) {
            LOGGER.warn("Unable to delete the video " + videoId + ": " + e.getMessage(), e);
            return HttpStatus.BAD_REQUEST;
        }
    }
/**
     * Delete the video with the given ID.
     *
     * @param videoId ID of the video to delete.
     * @return {@link HttpStatus#OK} if the video is deleted, {@link HttpStatus#BAD_REQUEST} if the video cannot be deleted.
     */
Delete the video with the given ID.
@param videoId ID of the video to delete.
@return  HttpStatus#OK if the video is deleted,  HttpStatus#BAD_REQUEST if the video cannot be deleted.
Delete the video with the given ID . @param videoId ID of the video to delete . @return HttpStatus#OK if the video is deleted HttpStatus#BAD_REQUEST if the video cannot be deleted .
@RequestMapping(value = "/videos/{videoId}", method = RequestMethod.DELETE)
    public HttpStatus deleteVideoById(@PathVariable("videoId") String videoId) {
        LOGGER.info("Delete the video " + videoId + "...");
        var client = new DefaultAcsClient(clientProfile);
        var request = new DeleteVideoRequest();
        request.setVideoIds(videoId);
        try {
            client.getAcsResponse(request);
            return HttpStatus.OK;
        } catch (ClientException e) {
            LOGGER.warn("Unable to delete the video " + videoId + ": " + e.getMessage(), e);
            return HttpStatus.BAD_REQUEST;
        }
    }
@ RequestMapping ( value = "/videos/{videoId}" , method = RequestMethod . DELETE ) public HttpStatus deleteVideoById ( @ PathVariable ( "videoId" ) String videoId ) { LOGGER . info ( "Delete the video " + videoId + "..." ) ; var client = new DefaultAcsClient ( clientProfile ) ; var request = new DeleteVideoRequest ( ) ; request . setVideoIds ( videoId ) ; try { client . getAcsResponse ( request ) ; return HttpStatus . OK ; } catch ( ClientException e ) { LOGGER . warn ( "Unable to delete the video " + videoId + ": " + e . getMessage ( ) , e ) ; return HttpStatus . BAD_REQUEST ; } }
Delete the video with the given ID.
Delete the video with the given ID .