Example #1
0
        public async Task DeleteDialogAsync(string dialogId)
        {
            if (!dialogId.IsValidPartitionOrRowKey())
            {
                throw new ValidationApiException($"{nameof(dialogId)} is invalid");
            }

            await _clientDialogsService.DeleteDialogAsync(dialogId);
        }
Example #2
0
        public async Task DeleteDialogAsync([FromBody] DeleteDialogRequest request)
        {
            var dialog = await _clientDialogsService.GetDialogAsync(request.DialogId);

            if (dialog == null)
            {
                throw new ValidationApiException("dialog not found");
            }

            if (dialog.IsGlobal)
            {
                throw new ValidationApiException("Global dialog can't be deleted");
            }

            await _clientDialogsService.DeleteDialogAsync(request.ClientId, request.DialogId);
        }