mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 19:22:45 +00:00
api: refactor user subscription check for monograph embed & links
This commit is contained in:
committed by
Abdullah Atta
parent
9860df2379
commit
cfe2875a67
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user