Added support for MySQL and ProgreSQL and AddSite/Tenant
This commit is contained in:
@ -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