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:
Bram de Smidt 2026-03-06 14:35:02 +01:00
parent 72e63a41c2
commit 01fd2df995

View file

@ -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(