add: get dpage plan by id
Build and Deploy Docker Images / build_and_deploy (push) Has been cancelled
Build and Deploy Docker Images / build_and_deploy (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Controller, Get, Post, Body, Query } from '@nestjs/common';
|
||||
import { Controller, Get, Post, Body, Query, Param } from '@nestjs/common';
|
||||
import { DPageService } from './dpage.service';
|
||||
import { LoginDto } from './dto/login.dto';
|
||||
import { UserDec } from '../../common/decorators/user.decorator';
|
||||
@@ -42,6 +42,13 @@ export class DpageController {
|
||||
getDpagePlans() {
|
||||
return this.dpageService.getDpagePlans();
|
||||
}
|
||||
|
||||
@SkipAuth()
|
||||
@ApiKeyGuards()
|
||||
@Get('dpage-admin/plans/:id')
|
||||
getDpagePlanById(@Param('id') id: string) {
|
||||
return this.dpageService.getDpagePlanById(id);
|
||||
}
|
||||
// @Get(':id')
|
||||
// findOne(@Param('id') id: string) {
|
||||
// return this.dpageService.findOne(+id);
|
||||
|
||||
@@ -261,6 +261,10 @@ export class DPageService {
|
||||
return this.subscriptionService.getDpagePlans();
|
||||
}
|
||||
|
||||
async getDpagePlanById(id: string) {
|
||||
return this.subscriptionService.getDpagePlanById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -693,6 +693,11 @@ export class SubscriptionsService {
|
||||
const plans = await this.subscriptionsPlanRepository.find({ where: { service:{slug:'Dpage'} } });
|
||||
return plans;
|
||||
}
|
||||
|
||||
async getDpagePlanById(id: string) {
|
||||
const plan = await this.subscriptionsPlanRepository.findOne({ where: { id, service:{slug:'Dpage'} } });
|
||||
return plan;
|
||||
}
|
||||
//************************************ */
|
||||
|
||||
async softDeleteUSerSubscription(userSubscriptionId: string) {
|
||||
|
||||
Reference in New Issue
Block a user