api: refactor user subscription check for monograph embed & links

This commit is contained in:
Abdullah Atta
2025-10-07 16:43:41 +05:00
committed by Abdullah Atta
parent 9860df2379
commit cfe2875a67
4 changed files with 17 additions and 78 deletions

View File

@@ -334,7 +334,7 @@ namespace Notesnook.API.Controllers
{
var json = JsonSerializer.Deserialize<MonographContent>(content);
var html = json.Data;
if (!Constants.IS_SELF_HOSTED && !ProUserRequirement.IsUserPro(User))
if (!Constants.IS_SELF_HOSTED && !User.IsUserSubscribed())
{
var config = Configuration.Default.WithDefaultLoader();
var context = BrowsingContext.New(config);
@@ -346,7 +346,7 @@ namespace Notesnook.API.Controllers
html = document.ToHtml();
}
if (ProUserRequirement.IsUserPro(User))
if (User.IsUserSubscribed())
{
var config = Configuration.Default.WithDefaultLoader();
var context = BrowsingContext.New(config);