fix: profile

This commit is contained in:
ilham 2022-01-03 13:12:39 +07:00
parent 9b2d4ba516
commit 074bc141eb

View File

@ -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);
}
}