From 074bc141eb10d1bb467fdb38cb4a19955b839c22 Mon Sep 17 00:00:00 2001 From: ilham Date: Mon, 3 Jan 2022 13:12:39 +0700 Subject: [PATCH] fix: profile --- src/auth/auth.controller.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); + } }