serealizer

This commit is contained in:
xXpuma99Xx
2022-04-16 09:52:15 -05:00
parent 03a886237f
commit f91d422d67
3 changed files with 39 additions and 5 deletions
+2 -3
View File
@@ -9,14 +9,13 @@ export class ModuloService {
@InjectRepository(Modulo) private repository: Repository<Modulo>,
) {}
findByIdInstitucion(id_institucion: number) {
findAllByIdInstitucion(id_institucion: number) {
return this.repository.find({
where: { institucion: id_institucion },
where: { institucion: { id_institucion: 1 } },
});
}
create(attrs: Partial<Modulo>) {
console.log(attrs);
return this.repository
.findOne({
where: { institucion: attrs.institucion, modulo: attrs.modulo },