Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 799219f62a | |||
| 5bae4d1a9e | |||
| 33244bf09d | |||
| de8751c505 | |||
| fecb5e27cd | |||
| 08aade7dcd | |||
| f04f01a39c | |||
| 066dd233f1 | |||
| 82550eefcc | |||
| c9f883de3c | |||
| a23ba6da18 |
@@ -57,11 +57,11 @@ export class ProfesorController {
|
||||
}
|
||||
|
||||
@Get("page")
|
||||
findAllPaginated(@Query("page") page: number = 1, @Query("limit") limit: number = 10, @Query() filters: any) {
|
||||
findAllPaginated(@Query("page") page: number = 1, @Query("limit") limit: number = 12, @Query() filters: any) {
|
||||
try {
|
||||
Logger.debug("Page Profesors");
|
||||
page = page < 1 ? 1 : page;
|
||||
limit = limit > 10 || limit < 1 ? 10 : limit;
|
||||
limit = limit > 12 || limit < 1 ? 12 : limit;
|
||||
return this.profesorService.findAllPaginated(page, limit, filters);
|
||||
} catch (err) {
|
||||
Logger.error("profesor controller ", err.error);
|
||||
|
||||
@@ -11,6 +11,10 @@ export class AdscripcionService {
|
||||
) {}
|
||||
|
||||
async findAll(): Promise<Adscripcion[]> {
|
||||
return this.adscripcionRepository.find();
|
||||
return await this.adscripcionRepository.find({
|
||||
order: {
|
||||
adscripcion: 'ASC',
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ import { ImagenModule } from './images/images.module';
|
||||
ProyectosAcademicos,
|
||||
TipoUsuario,
|
||||
],
|
||||
synchronize: true,
|
||||
}),
|
||||
}),
|
||||
ServeStaticModule.forRoot({
|
||||
|
||||
@@ -11,16 +11,16 @@ import { User } from 'src/users/entities/user.entity';
|
||||
imports: [
|
||||
UsersModule,
|
||||
JwtModule.registerAsync({
|
||||
inject:[ConfigService],
|
||||
useFactory:async(configService:ConfigService)=>{
|
||||
return{
|
||||
inject: [ConfigService],
|
||||
useFactory: async (configService: ConfigService) => {
|
||||
return {
|
||||
global: true,
|
||||
secret: configService.get('JWT_SECRET'),
|
||||
signOptions: { expiresIn: "7h"},
|
||||
}
|
||||
}
|
||||
signOptions: { expiresIn: '120h' },
|
||||
};
|
||||
},
|
||||
}),
|
||||
TypeOrmModule.forFeature([User])
|
||||
TypeOrmModule.forFeature([User]),
|
||||
],
|
||||
providers: [AuthService],
|
||||
controllers: [AuthController],
|
||||
|
||||
@@ -11,6 +11,10 @@ export class CategoriaService {
|
||||
) {}
|
||||
|
||||
async findAll(): Promise<Categoria[]> {
|
||||
return this.categoriaRepository.find();
|
||||
return this.categoriaRepository.find({
|
||||
order: {
|
||||
categoria: 'ASC',
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user