Se actualizo la infromacion de comentarios y participantes en el orden de enviar la infromacion y se documento el campo de orden en carrusel, para no causar conflicto falta arreglar esta parte

This commit is contained in:
Patriots01
2026-02-17 22:32:20 +00:00
parent fb31589c78
commit a53d9ddabe
7 changed files with 20 additions and 9 deletions

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

+1 -1
View File
@@ -75,7 +75,7 @@ import { Almacenamiento } from './almacenamiento/entity/almacenamiento.entity';
username: configService.get('DB_USER'),
password: configService.get('DB_PASSWORD'),
database: configService.get('DB_NAME'),
synchronize: false,
synchronize: true,
entities: [
Evento,
Participante,
+6
View File
@@ -111,6 +111,12 @@ export class CarruselService {
}
getAllImages(): Promise<Carrusel[]> {
// return this.carruselRepository.find();
// return this.carruselRepository.find({
// order: {
// orden: 'ASC',
// },
// });
return this.carruselRepository.find();
}
+4 -4
View File
@@ -1,4 +1,4 @@
import { IsNotEmpty, IsOptional } from "class-validator";
import { IsNotEmpty, IsOptional, IsNumber } from "class-validator";
export class carruselDto {
@IsNotEmpty()
@@ -7,7 +7,7 @@ export class carruselDto {
@IsNotEmpty()
link: string
// @IsNotEmpty() valida que no sea nulo ni undefined ni cadena vacía
@IsOptional()
orden?: string
// @IsOptional()
// @IsNumber()
// orden?: number
}
+2 -3
View File
@@ -13,7 +13,6 @@ export class Carrusel {
link: string
/* "https://www.acatlan.unam.mx/" */
@Column({length: 20})
orden: string
// @Column({ type: 'int', default: 0 })
// orden: number
}
+2
View File
@@ -54,6 +54,8 @@ export class ComentariosService {
if (to) {
query.andWhere('comentarios.fecha_registro <= :to', { to: new Date(to) });
}
query.orderBy('comentarios.fecha_registro', 'DESC');
return await query.getMany();
}
+5 -1
View File
@@ -20,7 +20,11 @@ export class EventosService {
) {}
getEventos() {
return this.eventoRepository.find();
return this.eventoRepository.find({
order: {
fecha_inicio: 'DESC',
},
});
}
public getEventosPorId(id: number) {