public OperationResultWithData <FolderDto> CreateSubFolder(string folderScoId, [FromBody] FolderDto dto) { if (dto == null) { throw new ArgumentNullException(nameof(dto)); } try { if (!LmsCompany.GetSetting <bool>(LmsCompanySettingNames.EnableMyContent)) { return(OperationResultWithData <FolderDto> .Error("Operation is not enabled.")); } // TRICK: dto.FolderId = folderScoId; var ac = this.GetUserProvider(); var helper = new ContentEditControllerHelper(Logger, ac); return(helper.CreateFolder(dto)); } catch (Exception ex) { string errorMessage = GetOutputErrorMessage("ContentApi-CreateSubFolder", ex); return(OperationResultWithData <FolderDto> .Error(errorMessage)); } }
public OperationResultWithData <FolderDto> CreateSubFolder(string folderScoId, [FromBody] FolderDto dto) { try { // TRICK: dto.FolderId = folderScoId; var ac = this.GetUserProvider(); var helper = new ContentEditControllerHelper(Logger, ac); return(helper.CreateFolder(dto)); } catch (Exception ex) { string errorMessage = GetOutputErrorMessage("ContentApi-CreateSubFolder", ex); return(OperationResultWithData <FolderDto> .Error(errorMessage)); } }