function deleteEvent(auth, req, res) {
	var calendar = google.calendar('v3');

	calendar.events.delete({
		auth: auth,
		calendarId: 'primary',
		eventId: req.params.id
	}, function(err, deleted_event) {
		if (err) {
			console.log('There was an error contacting the Calendar service: ' + err);
			return;
		}

		req.flash('success', 'Delete the event successfully');
		res.locals.messages = req.flash();

		res.redirect('/');
	});
}
/**
 * Delete a single event with specific eventId
 *
 */
Delete a single event with specific eventId
Delete a single event with specific eventId
function deleteEvent(auth, req, res) {
	var calendar = google.calendar('v3');
	calendar.events.delete({
		auth: auth,
		calendarId: 'primary',
		eventId: req.params.id
	}, function(err, deleted_event) {
		if (err) {
			console.log('There was an error contacting the Calendar service: ' + err);
			return;
		}
		req.flash('success', 'Delete the event successfully');
		res.locals.messages = req.flash();
		res.redirect('/');
	});
}
function deleteEvent ( auth , req , res ) { var calendar = google . calendar ( 'v3' ) ; calendar . events . delete ( { auth : auth , calendarId : 'primary' , eventId : req . params . id } , function ( err , deleted_event ) { if ( err ) { console . log ( 'There was an error contacting the Calendar service: ' + err ) ; return ; } req . flash ( 'success' , 'Delete the event successfully' ) ; res . locals . messages = req . flash ( ) ; res . redirect ( '/' ) ; } ) ; }
Delete a single event with specific eventId
Delete a single event with specific eventId