Files
api-AT/src/equipo/equipo.controller.ts
T

29 lines
636 B
TypeScript
Raw Normal View History

2026-01-21 17:10:49 -06:00
import {
Controller,
Get,
Param,
} from '@nestjs/common';
2025-09-24 18:37:56 -06:00
import { EquipoService } from './equipo.service';
2026-01-13 19:12:45 -06:00
import { Equipo } from './entities/equipo.entity';
2025-09-24 18:37:56 -06:00
@Controller('equipo')
export class EquipoController {
constructor(private readonly equipoService: EquipoService) {}
@Get()
2026-01-21 17:10:49 -06:00
findAll(): Promise<Equipo[]> {
2025-09-24 18:37:56 -06:00
return this.equipoService.findAll();
}
2026-01-21 17:10:49 -06:00
@Get('/student/:id')
findOnlyUsable(@Param('id')id:number): Promise<Equipo[]> {
return this.equipoService.findOnlyUsable(+id);
}
2025-09-24 18:37:56 -06:00
@Get(':id')
2026-01-21 17:10:49 -06:00
findOne(@Param('id') id: number): Promise<Equipo> {
2025-09-24 18:37:56 -06:00
return this.equipoService.findOne(+id);
}
}
2026-01-21 17:10:49 -06:00
//IO