adding pilot details view
This commit is contained in:
@@ -11,9 +11,9 @@ export class PilotInfoService {
|
|||||||
|
|
||||||
constructor(private readonly tableService: TableService) {}
|
constructor(private readonly tableService: TableService) {}
|
||||||
|
|
||||||
async find(rowKey: string): Promise<PilotInfoEntity> {
|
// async find(rowKey: string): Promise<PilotInfoEntity> {
|
||||||
return await this.pilotInfoRepository.find(this.partitionKey, rowKey);
|
// return await this.pilotInfoRepository.find(this.partitionKey, rowKey);
|
||||||
}
|
// }
|
||||||
|
|
||||||
async findAll(): Promise<PilotInfoEntity[]> {
|
async findAll(): Promise<PilotInfoEntity[]> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { PilotInfoDto } from './info/pilot-info.dto';
|
|||||||
import { TableInsertEntityHeaders } from '@azure/data-tables';
|
import { TableInsertEntityHeaders } from '@azure/data-tables';
|
||||||
import { CustomError } from '../customError/CustomError';
|
import { CustomError } from '../customError/CustomError';
|
||||||
import { PilotInfoEntity } from './info/pilot-info.entity';
|
import { PilotInfoEntity } from './info/pilot-info.entity';
|
||||||
import { AuthInterceptor } from 'src/interceptors/auth.interceptor';
|
import { PilotInterceptor } from 'src/pilot/interceptors/pilot.interceptor';
|
||||||
import { Public } from '@noahspan/noahspan-modules';
|
import { Public } from '@noahspan/noahspan-modules';
|
||||||
|
|
||||||
@Controller('pilots')
|
@Controller('pilots')
|
||||||
@@ -20,7 +20,7 @@ export class PilotController {
|
|||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
@Public()
|
@Public()
|
||||||
@UseInterceptors(AuthInterceptor)
|
@UseInterceptors(PilotInterceptor)
|
||||||
async findAll(): Promise<PilotInfoEntity[]> {
|
async findAll(): Promise<PilotInfoEntity[]> {
|
||||||
try {
|
try {
|
||||||
const pilots: PilotInfoEntity[] = await this.pilotInfoService.findAll();
|
const pilots: PilotInfoEntity[] = await this.pilotInfoService.findAll();
|
||||||
|
|||||||
Reference in New Issue
Block a user