mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-01 18:49:42 +02:00
api: refactor user subscription check for monograph embed & links
This commit is contained in:
1 parent
9860df2379
commit
cfe2875a67
4 files changed
+17
-78
No files matched your search
@@ -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