fix : free plan

This commit is contained in:
morteza-mortezai
2025-11-13 10:51:53 +03:30
parent 45036227da
commit bec0ba472e
@@ -329,12 +329,10 @@ export class SubscriptionsService {
if (plan.isFree) {
isFree = true;
const oneMonthAgo = dayjs().subtract(1, "month").toDate();
const existingFreePlanSubscription = await queryRunner.manager.findOne(UserSubscription, {
where: {
user: { id: userId },
plan: { isFree: true },
startDate: MoreThan(oneMonthAgo),
},
relations: {
plan: true,