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
+1 -7
View File
@@ -112,13 +112,7 @@ namespace Notesnook.API
policy.RequireAuthenticatedUser();
policy.Requirements.Add(new SyncRequirement());
});
options.AddPolicy("Pro", policy =>
{
policy.AuthenticationSchemes.Add("introspection");
policy.RequireAuthenticatedUser();
policy.Requirements.Add(new SyncRequirement());
policy.Requirements.Add(new ProUserRequirement());
});
options.AddPolicy(InboxApiKeyAuthenticationDefaults.AuthenticationScheme, policy =>
{
policy.AuthenticationSchemes.Add(InboxApiKeyAuthenticationDefaults.AuthenticationScheme);