add request wallet charge
This commit is contained in:
@@ -24,6 +24,7 @@ import { Permission } from 'src/common/enums/permission.enum';
|
||||
import { CacheResponse } from 'src/common/decorators/cache-response.decorator';
|
||||
import { CacheKeyPrefixes } from 'src/common/constants/cache-keys.constant';
|
||||
import { UpdateRestaurantBgDto } from '../dto/update-restaurant-bg.dto';
|
||||
import { ChargeRequestDto } from '../dto/charge-request.dto';
|
||||
|
||||
@ApiTags('restaurants')
|
||||
@Controller()
|
||||
@@ -97,6 +98,16 @@ export class RestaurantsController {
|
||||
return this.restaurantsService.findAllBackgrounds();
|
||||
}
|
||||
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Permissions(Permission.UPDATE_RESTAURANT)
|
||||
@ApiOperation({ summary: 'Request wallet charge via external invoice' })
|
||||
@ApiBody({ type: ChargeRequestDto })
|
||||
@Post('admin/restaurants/charge-request')
|
||||
chargeRequest(@RestId() restId: string, @Body() dto: ChargeRequestDto) {
|
||||
return this.restaurantsService.chargeRequest(restId, dto);
|
||||
}
|
||||
|
||||
/** Super Admin Endpoints */
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
|
||||
Reference in New Issue
Block a user