Feature/6 pilots delete (#42)
* adding pilot delete * adding pilot delete * adding pilot delete
This commit was merged in pull request #42.
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository, InjectRepository } from '@noahspan/azure-database';
|
||||
import { Medical } from './medical.entity';
|
||||
// import { Injectable } from '@nestjs/common';
|
||||
// import { Repository, InjectRepository } from '@noahspan/azure-database';
|
||||
// import { Medical } from './medical.entity';
|
||||
|
||||
@Injectable()
|
||||
export class MedicalService {
|
||||
private readonly partitionKey: string = 'medical';
|
||||
// @Injectable()
|
||||
// export class MedicalService {
|
||||
// private readonly partitionKey: string = 'medical';
|
||||
|
||||
constructor(
|
||||
@InjectRepository(Medical)
|
||||
private readonly profileRepository: Repository<Medical>
|
||||
) {}
|
||||
// constructor(
|
||||
// @InjectRepository(Medical)
|
||||
// private readonly profileRepository: Repository<Medical>
|
||||
// ) {}
|
||||
|
||||
async find(rowKey: string): Promise<Medical> {
|
||||
return this.profileRepository.find(this.partitionKey, rowKey);
|
||||
}
|
||||
// async find(rowKey: string): Promise<Medical> {
|
||||
// return this.profileRepository.find(this.partitionKey, rowKey);
|
||||
// }
|
||||
|
||||
async findAll(): Promise<Medical[]> {
|
||||
return this.profileRepository.findAll();
|
||||
}
|
||||
// async findAll(): Promise<Medical[]> {
|
||||
// return this.profileRepository.findAll();
|
||||
// }
|
||||
|
||||
async create(profile: Medical): Promise<Medical> {
|
||||
return this.profileRepository.create(profile);
|
||||
}
|
||||
// async create(profile: Medical): Promise<Medical> {
|
||||
// return this.profileRepository.create(profile);
|
||||
// }
|
||||
|
||||
async update(rowKey: string, profile: Medical): Promise<Medical> {
|
||||
return this.profileRepository.update(this.partitionKey, rowKey, profile);
|
||||
}
|
||||
// async update(rowKey: string, profile: Medical): Promise<Medical> {
|
||||
// return this.profileRepository.update(this.partitionKey, rowKey, profile);
|
||||
// }
|
||||
|
||||
async delete(rowKey: string) {
|
||||
return this.profileRepository.delete(this.partitionKey, rowKey);
|
||||
}
|
||||
}
|
||||
// async delete(rowKey: string) {
|
||||
// return this.profileRepository.delete(this.partitionKey, rowKey);
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -16,7 +16,6 @@ import { CustomError } from '../error/customError';
|
||||
import { AuthGuard } from '@nestjs/passport'
|
||||
|
||||
@Controller('pilots')
|
||||
@UseGuards(AuthGuard('azure-ad'))
|
||||
export class PilotController {
|
||||
constructor(private readonly pilotService: PilotService) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user