This commit is contained in:
2025-12-13 11:14:18 +03:30
parent 3eb6b889a4
commit c25a5afe01
80 changed files with 440 additions and 190 deletions
@@ -57,7 +57,14 @@ export class PagerController {
@UseGuards(OptionalAuthGuard)
@Get('public/pager')
@ApiOperation({ summary: 'Get all pager requests for the current session' })
@ApiHeader({ name: 'X-Slug', required: true, description: 'Restaurant slug identifier', example: 'zhivan' })
@ApiHeader({
name: 'X-Slug',
required: true,
schema: {
type: 'string',
default: 'zhivan',
},
})
@ApiHeader({ name: 'Authorization', required: false, description: 'Bearer token (optional authentication)' })
async findAll(@Req() request: FastifyRequest) {
const cookieId = request.cookies['pagerId'] || undefined;
@@ -1,5 +1,6 @@
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { AuthenticatedSocket } from '../guards/ws-admin-auth.guard';
import type { ExecutionContext } from '@nestjs/common';
import { createParamDecorator } from '@nestjs/common';
import type { AuthenticatedSocket } from '../guards/ws-admin-auth.guard';
/**
* Extract admin ID from authenticated WebSocket client
@@ -23,4 +24,3 @@ export const WsAdminId = createParamDecorator((data: unknown, ctx: ExecutionCont
return adminId;
});
@@ -1,5 +1,6 @@
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { AuthenticatedSocket } from '../guards/ws-admin-auth.guard';
import type { ExecutionContext } from '@nestjs/common';
import { createParamDecorator } from '@nestjs/common';
import type { AuthenticatedSocket } from '../guards/ws-admin-auth.guard';
/**
* Extract restaurant ID from authenticated WebSocket client
@@ -23,4 +24,3 @@ export const WsRestId = createParamDecorator((data: unknown, ctx: ExecutionConte
return restId;
});
+1 -1
View File
@@ -69,7 +69,7 @@ export class PagerService {
// Populate relations before emitting
await this.em.populate(pager, ['restaurant']);
// Emit socket event for new pager
// Emit socket event for new pager
this.eventEmitter.emit(PagerCreatedEvent.name, new PagerCreatedEvent(pager.restaurant.id));
return pager;