primer end point
This commit is contained in:
parent
2e379ccb58
commit
b1002d3da8
@ -1,7 +1,12 @@
|
|||||||
import { Controller } from '@nestjs/common';
|
import { Controller, Get } from '@nestjs/common';
|
||||||
import { InstitucionService } from './institucion.service';
|
import { InstitucionService } from './institucion.service';
|
||||||
|
|
||||||
@Controller('institucion')
|
@Controller('institucion')
|
||||||
export class InstitucionController {
|
export class InstitucionController {
|
||||||
constructor(private institucionService: InstitucionService) {}
|
constructor(private institucionService: InstitucionService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
get() {
|
||||||
|
return this.institucionService.findAllInstitucion();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,8 @@ export class InstitucionService {
|
|||||||
constructor(
|
constructor(
|
||||||
@InjectRepository(Institucion) private repository: Repository<Institucion>,
|
@InjectRepository(Institucion) private repository: Repository<Institucion>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
findAllInstitucion() {
|
||||||
|
return this.repository.find();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user