From 23a4a7b35d3710b3866d238b8c49dcbd66f59a8f Mon Sep 17 00:00:00 2001 From: Gbuntu Date: Mon, 18 Sep 2023 11:53:26 +0330 Subject: [PATCH] pagination and delete --- src/features/midjourney/midjourney.controller.ts | 3 +++ src/features/need/need.service.ts | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/midjourney/midjourney.controller.ts b/src/features/midjourney/midjourney.controller.ts index f5d94f964..7c4093005 100644 --- a/src/features/midjourney/midjourney.controller.ts +++ b/src/features/midjourney/midjourney.controller.ts @@ -246,6 +246,9 @@ export class MidjourneyController { const path = `../midjourney-bot/main/need-images/need-${flaskNeedId}`; if (checkIfFileOrDirectoryExists(path)) { const result = await rimraf(path); + const need = await this.needService.getNeedByFlaskId(flaskNeedId); + await this.needService.updateNeedMidjourney(need.id, ''); + return { result, flaskNeedId, diff --git a/src/features/need/need.service.ts b/src/features/need/need.service.ts index f04c86d5b..7c5cd327c 100644 --- a/src/features/need/need.service.ts +++ b/src/features/need/need.service.ts @@ -148,8 +148,6 @@ export class NeedService { needId: string, selectedImage: string, ): Promise { - console.log(needId, selectedImage); - return this.needRepository.update(needId, { midjourneyImage: selectedImage, });