18 lines
524 B
TypeScript
18 lines
524 B
TypeScript
import { Controller, Get, Param } from '@nestjs/common';
|
|
import { GeneService } from './gene.service';
|
|
import { GeneDetailModel } from './entities/gene-detail.entity';
|
|
|
|
@Controller('gene')
|
|
export class GeneController {
|
|
constructor(private readonly geneService: GeneService) {}
|
|
|
|
/**
|
|
* 개체식별번호로 유전자 상세 정보 조회
|
|
* GET /gene/:cowId
|
|
*/
|
|
@Get(':cowId')
|
|
async findByCowId(@Param('cowId') cowId: string): Promise<GeneDetailModel[]> {
|
|
return this.geneService.findByCowId(cowId);
|
|
}
|
|
}
|