diff --git a/src/features/need/need.controller.ts b/src/features/need/need.controller.ts index 7b4653f12..ebb6a69af 100644 --- a/src/features/need/need.controller.ts +++ b/src/features/need/need.controller.ts @@ -303,7 +303,7 @@ export class NeedController { !toBeConfirmed || !toBeConfirmed.list[0] || !toBeConfirmed.createdAt || - timeDifference(toBeConfirmed.createdAt, new Date()).mm >= 1; + timeDifference(toBeConfirmed.createdAt, new Date()).mm >= 5; console.log(`Mass prepare expired: ${expired}`); console.log( `Last prepare: ${ @@ -339,6 +339,8 @@ export class NeedController { fetchedNeed.status !== need.status || fetchedNeed.category !== need.category || fetchedNeed.type !== need.type || + fetchedNeed.details !== need.details || + fetchedNeed.information !== need.informations || fetchedNeed.nameTranslations.en !== need.name_translations.en ) { const { need: nestNeed } = await this.syncService.syncNeed( diff --git a/src/features/need/need.service.ts b/src/features/need/need.service.ts index d0254e2a8..36ee39b9f 100644 --- a/src/features/need/need.service.ts +++ b/src/features/need/need.service.ts @@ -375,27 +375,29 @@ export class NeedService { .andWhere('need.status = :statusNotPaid', { statusNotPaid: PaymentStatusEnum.NOT_PAID, }) - .select([ - 'child.sayname_translations', - 'ngo.id', - 'ngo.name', - 'need.id', - 'need.child_id', - 'need.created_by_id', - 'need.name_translations', - 'need.description_translations', - 'need.title', - 'need.imageUrl', - 'need.category', - 'need.type', - 'need.link', - 'need.status', - 'need.img', - 'need._cost', - 'need.isDeleted', - 'need.created', - 'need.confirmDate', - ]) + // .select([ + // 'child.sayname_translations', + // 'ngo.id', + // 'ngo.name', + // 'need.id', + // 'need.child_id', + // 'need.created_by_id', + // 'need.name_translations', + // 'need.description_translations', + // 'need.title', + // 'need.imageUrl', + // 'need.category', + // 'need.type', + // 'need.link', + // 'need.status', + // 'need.img', + // 'need._cost', + // 'need.details', + // 'need.informations', + // 'need.isDeleted', + // 'need.created', + // 'need.confirmDate', + // ]) .cache(60000) .orderBy('need.created', 'ASC'); return await queryBuilder.getManyAndCount();