new Ep
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
Post,
|
||||
Body,
|
||||
Patch,
|
||||
Param,
|
||||
Delete,
|
||||
} from '@nestjs/common';
|
||||
import { EquipoService } from './equipo.service';
|
||||
import { Equipo } from './entities/equipo.entity';
|
||||
|
||||
@@ -7,13 +15,18 @@ export class EquipoController {
|
||||
constructor(private readonly equipoService: EquipoService) {}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
findAll(): Promise<Equipo[]> {
|
||||
return this.equipoService.findAll();
|
||||
}
|
||||
|
||||
@Get('/student/:id')
|
||||
findOnlyUsable(@Param('id')id:number): Promise<Equipo[]> {
|
||||
return this.equipoService.findOnlyUsable(+id);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: number):Promise<Equipo> {
|
||||
findOne(@Param('id') id: number): Promise<Equipo> {
|
||||
return this.equipoService.findOne(+id);
|
||||
}
|
||||
}
|
||||
//IO
|
||||
//IO
|
||||
|
||||
Reference in New Issue
Block a user