Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules010209 authored Feb 6, 2023
1 parent 28f79ca commit edaa15f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bordeaux-atis",
"version": "0.0.1",
"version": "0.1.3",
"description": "",
"author": "",
"private": true,
Expand Down
5 changes: 3 additions & 2 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AppService } from './app.service';
import { AtisDto } from './dto/atis.dto';
import { DataDto } from './dto/data.dto';
import { ErrorDto } from './dto/error.dto';
import { AirportDto } from './dto/airport.dto';

@ApiTags('Api')
@Controller()
Expand Down Expand Up @@ -37,15 +38,15 @@ export class AppController {

@ApiSecurity('X-API-KEY')
@ApiParam({ name: 'icao', type: String, example: 'LFBD', required: true })
@ApiOkResponse({ status: 200, type: DataDto })
@ApiOkResponse({ status: 200, type: AirportDto })
@Get('/sid/:icao')
sid(@Param('icao') icao: any, @Res() res: any) {
return this.appService.sid(icao, res);
}

@ApiSecurity('X-API-KEY')
@ApiParam({ name: 'icao', type: String, example: 'LFBH', required: true })
@ApiOkResponse({ status: 200, type: DataDto })
@ApiOkResponse({ status: 200, type: AirportDto })
@Get('/star/:icao')
star(@Param('icao') icao: any, @Res() res: any) {
return this.appService.star(icao, res);
Expand Down
6 changes: 6 additions & 0 deletions src/dto/airport.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';

export class AirportDto {
@ApiProperty()
runway: Object
}
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async function bootstrap() {

SwaggerModule.setup('docs', app, document, {
customSiteTitle: 'Bordeaux Atis API',
customfavIcon: 'https://www.bordeaux.aeroport.fr/themes/custom/adbm_theme/favicon.ico',
});

await app.listen(parseInt(process.env.PORT));
Expand Down

0 comments on commit edaa15f

Please sign in to comment.