public OperationResult EditSco(string scoId, [FromBody] FileUpdateDto dto) { try { var ac = this.GetUserProvider(); var helper = new ContentEditControllerHelper(Logger, ac); return(helper.EditSco(scoId, dto)); } catch (Exception ex) { string errorMessage = GetOutputErrorMessage("ContentApi-EditFile", ex); return(OperationResult.Error(errorMessage)); } }
public OperationResult EditSco(string scoId, [FromBody] FileUpdateDto dto) { if (dto == null) { throw new ArgumentNullException(nameof(dto)); } try { if (!LmsCompany.GetSetting <bool>(LmsCompanySettingNames.EnableMyContent)) { return(OperationResult.Error("Operation is not enabled.")); } var ac = this.GetUserProvider(); var helper = new ContentEditControllerHelper(Logger, ac); return(helper.EditSco(scoId, dto)); } catch (Exception ex) { string errorMessage = GetOutputErrorMessage("ContentApi-EditFile", ex); return(OperationResult.Error(errorMessage)); } }