primer end point

This commit is contained in:
xXpuma99Xx
2022-04-04 23:13:55 -05:00
parent 2e379ccb58
commit b1002d3da8
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -1,7 +1,12 @@
import { Controller } from '@nestjs/common';
import { Controller, Get } from '@nestjs/common';
import { InstitucionService } from './institucion.service';
@Controller('institucion')
export class InstitucionController {
constructor(private institucionService: InstitucionService) {}
@Get()
get() {
return this.institucionService.findAllInstitucion();
}
}
+4
View File
@@ -8,4 +8,8 @@ export class InstitucionService {
constructor(
@InjectRepository(Institucion) private repository: Repository<Institucion>,
) {}
findAllInstitucion() {
return this.repository.find();
}
}