fix: skip subscription check when Stripe is not configured
When STRIPE_SECRET_KEY is not set, posting should work without requiring a subscription row in the database. This allows self-hosted instances without Stripe to publish posts normally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
72e63a41c2
commit
01fd2df995
1 changed files with 5 additions and 3 deletions
|
|
@ -85,9 +85,11 @@ export class PostActivity {
|
|||
|
||||
@ActivityMethod()
|
||||
async getPostsList(orgId: string, postId: string) {
|
||||
const subscription = await this._subscriptionService.getSubscription(orgId);
|
||||
if (!subscription) {
|
||||
return [];
|
||||
if (process.env.STRIPE_SECRET_KEY) {
|
||||
const subscription = await this._subscriptionService.getSubscription(orgId);
|
||||
if (!subscription) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
const getPosts = await this._postService.getPostsRecursively(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue