Added support for MySQL and ProgreSQL and AddSite/Tenant
This commit is contained in:
		| @ -80,7 +80,7 @@ | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 htmltext = new HtmlTextInfo(); | ||||
|                 htmltext = new HtmlText(); | ||||
|                 htmltext.ModuleId = ModuleState.ModuleId; | ||||
|                 htmltext.Content = content; | ||||
|                 await HtmlTextService.AddHtmlTextAsync(htmltext); | ||||
|  | ||||
| @ -19,18 +19,18 @@ namespace Oqtane.Modules.HtmlText.Services | ||||
|  | ||||
|         private string ApiUrl => CreateApiUrl(_siteState.Alias, "HtmlText"); | ||||
|  | ||||
|         public async Task<HtmlTextInfo> GetHtmlTextAsync(int moduleId) | ||||
|         public async Task<Models.HtmlText> GetHtmlTextAsync(int moduleId) | ||||
|         { | ||||
|             var htmltext = await GetJsonAsync<List<HtmlTextInfo>>(CreateAuthorizationPolicyUrl($"{ApiUrl}/{moduleId}", moduleId)); | ||||
|             var htmltext = await GetJsonAsync<List<Models.HtmlText>>(CreateAuthorizationPolicyUrl($"{ApiUrl}/{moduleId}", moduleId)); | ||||
|             return htmltext.FirstOrDefault(); | ||||
|         } | ||||
|  | ||||
|         public async Task AddHtmlTextAsync(HtmlTextInfo htmlText) | ||||
|         public async Task AddHtmlTextAsync(Models.HtmlText htmlText) | ||||
|         { | ||||
|             await PostJsonAsync(CreateAuthorizationPolicyUrl($"{ApiUrl}", htmlText.ModuleId), htmlText); | ||||
|         } | ||||
|  | ||||
|         public async Task UpdateHtmlTextAsync(HtmlTextInfo htmlText) | ||||
|         public async Task UpdateHtmlTextAsync(Models.HtmlText htmlText) | ||||
|         { | ||||
|             await PutJsonAsync(CreateAuthorizationPolicyUrl($"{ApiUrl}/{htmlText.HtmlTextId}", htmlText.ModuleId), htmlText); | ||||
|         } | ||||
|  | ||||
| @ -6,11 +6,11 @@ namespace Oqtane.Modules.HtmlText.Services | ||||
| { | ||||
|     public interface IHtmlTextService  | ||||
|     { | ||||
|         Task<HtmlTextInfo> GetHtmlTextAsync(int ModuleId); | ||||
|         Task<Models.HtmlText> GetHtmlTextAsync(int ModuleId); | ||||
|  | ||||
|         Task AddHtmlTextAsync(HtmlTextInfo htmltext); | ||||
|         Task AddHtmlTextAsync(Models.HtmlText htmltext); | ||||
|  | ||||
|         Task UpdateHtmlTextAsync(HtmlTextInfo htmltext); | ||||
|         Task UpdateHtmlTextAsync(Models.HtmlText htmltext); | ||||
|  | ||||
|         Task DeleteHtmlTextAsync(int ModuleId); | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Charles Nurse
					Charles Nurse