diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index cbc862f..2c6806e 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get, Post, Request, UseGuards } from '@nestjs/common'; +import { Controller, Get, Param, ParseUUIDPipe, Post, Request, UseGuards } from '@nestjs/common'; import { LocalAuthGuard } from './local-auth.guard'; import { AuthService } from './auth.service'; import { Public } from './public.decorator'; @@ -21,4 +21,9 @@ export class AuthController { getProfile(@Request() req) { return this.authService.getProfile(req.user.userId); } + + @Get('profile/:id') + getProfileById(@Param('id', ParseUUIDPipe) id: string) { + return this.authService.getProfile(id); + } }