Skip to content

Commit

Permalink
๐Ÿ”จ Fix: file๋งŒ ์ž„๋ฒ ๋”ฉ ์š”์ฒญํ•˜๊ณ  image๋Š” ์ž„๋ฒ ๋”ฉ ์š”์ฒญํ•˜์ง€ ์•Š๋„๋ก ๋ณ€๊ฒฝ ๋ฐ ๊ทธ์— ๋”ฐ๋ฅธ ์ƒํƒœ ๋ณ€๊ฒฝ
Browse files Browse the repository at this point in the history
image๋Š” ์—…๋กœ๋“œ ์„ฑ๊ณต์‹œ Status.COMPLETED, ๊ทธ ์™ธ ํŒŒ์ผ์€ Status.EMBED_PENDING

#
  • Loading branch information
ks1ksi committed Oct 5, 2023
1 parent 89b1227 commit 6e8c3ba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/document/document.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,21 @@ export class DocumentService {
documentType === DocumentType.IMAGE
? `${this.configService.get<string>('THUMBNAIL_URL')}/${docId}`
: null,
status: Status.EMBED_PENDING,
status:
documentType === DocumentType.IMAGE
? Status.COMPLETED
: Status.EMBED_PENDING,
user: { connect: { id: user.id } },
title: file.originalname,
},
include: { tags: true },
});
await this.requestEmbed(document.id);

// FILE ์ธ ๊ฒฝ์šฐ ์ž„๋ฒ ๋”ฉ ์š”์ฒญ
if (documentType === DocumentType.FILE) {
await this.requestEmbed(document.id);
}

documentDtos.push(new DocumentDto(document));
} catch (error) {
this.logger.error(error);
Expand Down

0 comments on commit 6e8c3ba

Please sign in to comment.