1 Commits

Author SHA1 Message Date
miguel e811f67c07 Add ordering to findAll methods in Adscripcion, Categoria, and Edificio services 2025-06-04 10:44:53 -06:00
5 changed files with 14 additions and 17 deletions
+2 -4
View File
@@ -11,10 +11,8 @@ export class AdscripcionService {
) {} ) {}
async findAll(): Promise<Adscripcion[]> { async findAll(): Promise<Adscripcion[]> {
return await this.adscripcionRepository.find({ return this.adscripcionRepository.find({
order: { order: { adscripcion: 'ASC' }, // Change 'adscripcion' to your desired column for ordering
adscripcion: 'ASC',
}
}); });
} }
} }
+1
View File
@@ -54,6 +54,7 @@ import { ImagenModule } from './images/images.module';
ProyectosAcademicos, ProyectosAcademicos,
TipoUsuario, TipoUsuario,
], ],
synchronize: true,
}), }),
}), }),
ServeStaticModule.forRoot({ ServeStaticModule.forRoot({
+7 -7
View File
@@ -11,16 +11,16 @@ import { User } from 'src/users/entities/user.entity';
imports: [ imports: [
UsersModule, UsersModule,
JwtModule.registerAsync({ JwtModule.registerAsync({
inject: [ConfigService], inject:[ConfigService],
useFactory: async (configService: ConfigService) => { useFactory:async(configService:ConfigService)=>{
return { return{
global: true, global: true,
secret: configService.get('JWT_SECRET'), secret: configService.get('JWT_SECRET'),
signOptions: { expiresIn: '120h' }, signOptions: { expiresIn: "7h"},
}; }
}, }
}), }),
TypeOrmModule.forFeature([User]), TypeOrmModule.forFeature([User])
], ],
providers: [AuthService], providers: [AuthService],
controllers: [AuthController], controllers: [AuthController],
+1 -5
View File
@@ -11,10 +11,6 @@ export class CategoriaService {
) {} ) {}
async findAll(): Promise<Categoria[]> { async findAll(): Promise<Categoria[]> {
return this.categoriaRepository.find({ return this.categoriaRepository.find({ order: { categoria: 'ASC' } });
order: {
categoria: 'ASC',
},
});
} }
} }
+3 -1
View File
@@ -11,6 +11,8 @@ export class EdificioService {
) {} ) {}
async findAll(): Promise<Edificio[]> { async findAll(): Promise<Edificio[]> {
return this.categoriaRepository.find(); return this.categoriaRepository.find({
order: { edificio: 'ASC' }, // Change 'edificio' to your desired column for ordering
});
} }
} }