function deleteAudioFromDatabase(req, res){
    cloudant.use(req.params.dronename + '_audio').get(req.params.docID, function(err, document){
        if(err){
            logger.error('[audio.delete]: ' + "Couldn't delete audio");
            res.status(err.statusCode).send("Couldn't delete audio\n");
        } else {
            cloudant.use('drone_audio').destroy(req.params.docID, document._rev, function(){
                logger.info('[audio.delete]: Successfully deleted audio ' + req.params.docID);
                res.status(200).send("Successfully deleted audio\n");
            });
        }
    });
}
/**
 * Delete audio file from Cloudant database
 * @param req {Object} The request from the client
 * @param req.params.dronename {String} The drone database to use
 * @param req.params.docID {String} The requested document id
 * @param res {Object} The response for the client
 */
Delete audio file from Cloudant database
@param req {Object} The request from the client
@param req.params.dronename {String} The drone database to use
@param req.params.docID {String} The requested document id
@param res {Object} The response for the client
Delete audio file from Cloudant database @param req { Object } The request from the client @param req . params . dronename { String } The drone database to use @param req . params . docID { String } The requested document id @param res { Object } The response for the client
function deleteAudioFromDatabase(req, res){
    cloudant.use(req.params.dronename + '_audio').get(req.params.docID, function(err, document){
        if(err){
            logger.error('[audio.delete]: ' + "Couldn't delete audio");
            res.status(err.statusCode).send("Couldn't delete audio\n");
        } else {
            cloudant.use('drone_audio').destroy(req.params.docID, document._rev, function(){
                logger.info('[audio.delete]: Successfully deleted audio ' + req.params.docID);
                res.status(200).send("Successfully deleted audio\n");
            });
        }
    });
}
function deleteAudioFromDatabase ( req , res ) { cloudant . use ( req . params . dronename + '_audio' ) . get ( req . params . docID , function ( err , document ) { if ( err ) { logger . error ( '[audio.delete]: ' + "Couldn't delete audio" ) ; res . status ( err . statusCode ) . send ( "Couldn't delete audio\n" ) ; } else { cloudant . use ( 'drone_audio' ) . destroy ( req . params . docID , document . _rev , function ( ) { logger . info ( '[audio.delete]: Successfully deleted audio ' + req . params . docID ) ; res . status ( 200 ) . send ( "Successfully deleted audio\n" ) ; } ) ; } } ) ; }
Delete audio file from Cloudant database
 @param req {Object} The request from the client
 @param req.params.dronename {String} The drone database to use
 @param req.params.docID {String} The requested document id
 @param res {Object} The response for the client
Delete audio file from Cloudant database @param req { Object } The request from the client @param req . params . dronename { String } The drone database to use @param req . params . docID { String } The requested document id @param res { Object } The response for the client