get subscription in admin

This commit is contained in:
2026-07-08 22:23:14 +03:30
parent 3250a6456b
commit 1dd2813a01
34 changed files with 188 additions and 119 deletions
@@ -1,7 +1,4 @@
import {
Injectable,
NotFoundException,
} from '@nestjs/common';
import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { CreateSubscriptionPlanDto } from './dto/create-subscription-plan.dto';
@@ -56,7 +53,8 @@ export class SubscriptionPlansService {
}
if (dto.name !== undefined) plan.name = dto.name;
if (dto.code !== undefined) plan.code = dto.code;
if (dto.durationMonths !== undefined) plan.durationMonths = dto.durationMonths;
if (dto.durationMonths !== undefined)
plan.durationMonths = dto.durationMonths;
if (dto.freeSmsCount !== undefined) plan.freeSmsCount = dto.freeSmsCount;
if (dto.isActive !== undefined) plan.isActive = dto.isActive;
return this.plansRepository.save(plan);