Compare commits

3 Commits

Author SHA1 Message Date
IO 645c4ed6c1 fixed modified machines' programs and search programs 2026-03-20 17:51:12 -05:00
IO 4bd78578a7 pool limited 2026-03-19 15:56:59 -05:00
IO 5f5295dcb4 fixed format 2026-03-18 18:28:23 -05:00
4 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -86,6 +86,10 @@ import { Costo } from './costo/entities/costo.entity';
Costo,
],
synchronize: false, //Never change to true in production!
extra: {
connectionLimit: 10,
},
}),
}),
UserModule,
@@ -113,5 +117,5 @@ import { Costo } from './costo/entities/costo.entity';
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
export class AppModule { }
//IO
@@ -13,8 +13,8 @@ export class ProgramaEquipoController {
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get('programas/:id')
findAllProgramByNumber(@Param('id') id: number) {
return this.programaEquipoService.findAllProgramByNumber(+id);
async findAllProgramByNumber(@Param('id') id: number) {
return await this.programaEquipoService.findAllProgramByNumber(+id);
}
@UseGuards(JwtAuthGuard, RolesGuard)
@@ -28,7 +28,7 @@ export class ProgramaEquipoController {
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get(':id')
findOne(@Param('id') id: string) {
findOne(@Param('id') id: number) {
return this.programaEquipoService.findOne(id);
}
@@ -21,9 +21,9 @@ export class ProgramaEquipoService {
return this.programaEquipoRepository.find();
}
async findOne(ubicacion: string) {
async findOne(id_equipo: number) {
const equipo = await this.programaEquipoRepository.find({
where: { equipo: { ubicacion } },
where: { equipo: { id_equipo } },
});
if (equipo.length === 0) {
+1 -1
View File
@@ -37,7 +37,7 @@ export class UserController {
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get('/perfil')
@Get('/perfil')
async getAllPerfil() {
return this.userService.getAllPerfil();
}