Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

429 B
Raw Blame
import type { User } from '../../types';
import { createParamDecorator, ExecutionContext } from '@nestjs/common';

/**
 * Resolves the authenticated user attached by JwtAuthGuard.
 * Use on guarded handlers: `getThing(@CurrentUser() user: User) { ... }`.
 */
export const CurrentUser = createParamDecorator((_data: unknown, context: ExecutionContext): User | undefined => {
  return context.switchToHttp().getRequest().user;
});