/
Befun
/
KiizLab
Обзор
Документация
Войти
/
Befun
/
KiizLab
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/src/user/user.controller.ts
18 строк
556 B
BeFun
Add: tests and course modules
22 апр 2025, 17:59
22 апр 2025, 17:59
2333161
Код
Авторство
О чём код?
import { Controller, Get } from '@nestjs/common' import { ApiBearerAuth } from '@nestjs/swagger' import { Auth } from 'src/auth/decorators/auth.decorator' import { CurrentUser } from 'src/auth/decorators/user.decorator' import { UserService } from './user.service' @Controller('user') export class UserController { constructor(private readonly userService: UserService) {} @Get('/profile') @Auth() @ApiBearerAuth() async profile(@CurrentUser('id') id: string) { const { password, ...user } = await this.userService.findById(id) return user } }