add request wallet charge

This commit is contained in:
2026-07-04 10:55:02 +03:30
parent 95240a311e
commit 9f8d39938c
11 changed files with 274 additions and 5 deletions
@@ -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()