Skip to content

Commit

Permalink
pagination and delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Sep 18, 2023
1 parent 762b416 commit 23a4a7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/features/midjourney/midjourney.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/features/need/need.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export class NeedService {
needId: string,
selectedImage: string,
): Promise<UpdateResult> {
console.log(needId, selectedImage);

return this.needRepository.update(needId, {
midjourneyImage: selectedImage,
});
Expand Down

0 comments on commit 23a4a7b

Please sign in to comment.