product module
This commit is contained in:
@@ -2,7 +2,7 @@ import { Controller, Get, Post, Body, UseGuards, Res, Req, Patch, Param } from '
|
||||
import { PagerService } from '../providers/pager.service';
|
||||
import { CreatePagerDto } from '../dto/create-pager.dto';
|
||||
import { OptionalAuthGuard } from '../../../auth/guards/optinalAuth.guard';
|
||||
import { RestId } from 'src/common/decorators/rest-id.decorator';
|
||||
import { ShopId } from 'src/common/decorators/rest-id.decorator';
|
||||
import { UserId } from 'src/common/decorators/user-id.decorator';
|
||||
import { RestSlug } from 'src/common/decorators/rest-slug.decorator';
|
||||
import { ApiTags, ApiOperation, ApiBody, ApiHeader, ApiBearerAuth, ApiParam } from '@nestjs/swagger';
|
||||
@@ -31,7 +31,7 @@ export class PagerController {
|
||||
@Req() request: FastifyRequest,
|
||||
@Res() reply: FastifyReply,
|
||||
@RestSlug() slug: string,
|
||||
@RestId() restId?: string,
|
||||
@ShopId() restId?: string,
|
||||
@UserId() userId?: string,
|
||||
) {
|
||||
// Convert empty strings to undefined for cleaner validation
|
||||
@@ -79,7 +79,7 @@ export class PagerController {
|
||||
@ApiBearerAuth()
|
||||
@Get('admin/pager')
|
||||
@ApiOperation({ summary: 'Get all pager requests for the shop' })
|
||||
async findAllAdmin(@RestId() restId: string) {
|
||||
async findAllAdmin(@ShopId() restId: string) {
|
||||
return this.pagerService.findAllByRestaurantId(restId);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ export class PagerController {
|
||||
@ApiBody({ type: UpdatePagerStatusDto })
|
||||
async updateStatus(
|
||||
@Param('pagerId') pagerId: string,
|
||||
@RestId() restId: string,
|
||||
@ShopId() restId: string,
|
||||
@AdminId() adminId: string,
|
||||
@Body() dto: UpdatePagerStatusDto,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user