| 1 | import { Controller, Get } from '@nestjs/common'; |
| 2 | import { |
| 3 | ApiBearerAuth, |
| 4 | ApiOkResponse, |
| 5 | ApiOperation, |
| 6 | ApiTags, |
| 7 | ApiUnauthorizedResponse, |
| 8 | } from '@nestjs/swagger'; |
| 9 | import { ProfileService } |
| 10 | import { ProfileStatsResponseEntity } |
| 11 | import { GenericErrorEntity } |
| 12 | import { Auth } |
| 13 | import { User } |
| 14 | |
| 15 | @Controller('profile') |
| 16 | @ApiTags('Profile') |
| 17 | @ApiBearerAuth('JWT-auth') |
| 18 | export class ProfileController |
| 19 | constructor(private readonly |
| 20 | |
| 21 | @Get('@me' |
| 22 | @ApiOperation({ |
| 23 | summary: 'Get profile stats', |
| 24 | description: 'Returns comprehensive statistics about tracked flights including passport data, aircraft stats, airlines, airports, and routes', |
| 25 | }) |
| 26 | @ApiOkResponse({ |
| 27 | type: ProfileStatsResponseEntity, |
| 28 | description: 'Profile statistics including passport data and flight analytics', |
| 29 | }) |
| 30 | @ApiUnauthorizedResponse({ type |
| 31 | async getProfileStats(@ |
| 32 | return await this |
| 33 | } |
| 34 | } |