upgrade sub
This commit is contained in:
@@ -2,6 +2,7 @@ import { Controller, Get, Post, Body, Patch, Param, UseGuards, Delete, Query } f
|
||||
import { RestaurantsService } from '../providers/restaurants.service';
|
||||
import { CreateRestaurantDto } from '../dto/create-restaurant.dto';
|
||||
import { UpdateRestaurantDto } from '../dto/update-restaurant.dto';
|
||||
import { UpgradeSubscriptionDto } from '../dto/upgrade-subscription.dto';
|
||||
import { FindRestaurantsDto } from '../dto/find-restaurants.dto';
|
||||
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
||||
import {
|
||||
@@ -99,4 +100,17 @@ export class RestaurantsController {
|
||||
return this.restaurantsService.update(id, updateRestaurantDto);
|
||||
}
|
||||
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Upgrade subscription for a restaurant' })
|
||||
@ApiParam({ name: 'subscriptionId', required: true, description: 'Subscription ID' })
|
||||
@ApiBody({ type: UpgradeSubscriptionDto })
|
||||
@Patch('super-admin/restaurants/subscription/:subscriptionId/upgrade')
|
||||
upgradeSubscription(
|
||||
@Param('subscriptionId') subscriptionId: string,
|
||||
@Body() upgradeSubscriptionDto: UpgradeSubscriptionDto
|
||||
) {
|
||||
return this.restaurantsService.upgradeSubscription(subscriptionId, upgradeSubscriptionDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user