public async Task <dynamic> DeleteAudio(string audioId) { string userId = Request.Query .SingleOrDefault(q => string.Compare(q.Key, "userId", StringComparison.OrdinalIgnoreCase) == 0) .Value; if (string.IsNullOrEmpty(userId) || string.IsNullOrEmpty(audioId)) { return(BadRequest("Missing parameters in request, userId/audioId")); } try { return(await _crudService.DeleteAudioAsync(userId, audioId)); } catch (Exception e) { _logger.LogError("Delete Audio Failed " + e); return(BadRequest(e.Message)); } }