This commit is contained in:
@@ -8,6 +8,8 @@ import { FindBusinessesDto } from './dto/find-businesses.dto';
|
||||
import { AdminRoute } from '../../common/decorators/admin.decorator';
|
||||
import { PermissionsDec } from '../../common/decorators/permission.decorator';
|
||||
import { PermissionEnum } from '../users/enums/permission.enum';
|
||||
import { ApiKeyGuards } from '../../common/decorators/api-key-guard.decorator';
|
||||
import { SkipAuth } from '../../common/decorators/skip-auth.decorator';
|
||||
|
||||
@Controller()
|
||||
@ApiTags('d-page')
|
||||
@@ -28,11 +30,18 @@ export class DpageController {
|
||||
|
||||
@Get('admin/business/list')
|
||||
@AdminRoute()
|
||||
@PermissionsDec(PermissionEnum.DMENU)
|
||||
@PermissionsDec(PermissionEnum.DPAGE)
|
||||
findAll(@Query() dto: FindBusinessesDto) {
|
||||
return this.dpageService.findAllBusinesses(dto);
|
||||
}
|
||||
|
||||
// ----------------- dpage -admin routes-----------
|
||||
@SkipAuth()
|
||||
@ApiKeyGuards()
|
||||
@Get('dpage-admin/plans')
|
||||
getDpagePlans() {
|
||||
return this.dpageService.getDpagePlans();
|
||||
}
|
||||
// @Get(':id')
|
||||
// findOne(@Param('id') id: string) {
|
||||
// return this.dpageService.findOne(+id);
|
||||
|
||||
@@ -256,6 +256,11 @@ export class DPageService {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async getDpagePlans() {
|
||||
return this.subscriptionService.getDpagePlans();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -688,6 +688,11 @@ export class SubscriptionsService {
|
||||
};
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
async getDpagePlans() {
|
||||
const plans = await this.subscriptionsPlanRepository.find({ where: { service:{slug:'Dpage'} } });
|
||||
return plans;
|
||||
}
|
||||
//************************************ */
|
||||
|
||||
async softDeleteUSerSubscription(userSubscriptionId: string) {
|
||||
|
||||
Reference in New Issue
Block a user