Skip to content

Commit

Permalink
receipt verified
Browse files Browse the repository at this point in the history
  • Loading branch information
eldpswp99 committed Nov 21, 2023
1 parent 5db0355 commit b617eda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/review/models/image.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ export class ImageEntity extends IssuedAtMetaEntity {
this.isReceipt = true;
await this.save();
}

async markAsReceiptVerified() {
this.isReceiptVerified = true;
await this.save();
}
}
1 change: 1 addition & 0 deletions backend/src/review/review.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class ReviewService {
try {
const receiptData = await getReceiptOcr(receiptImage.url);
console.log(receiptData);
await receiptImage.markAsReceiptVerified();
menu = receiptData['menu'];
} catch (e) {
throw new BadRequestException('잘못된 영수증입니다.');
Expand Down

0 comments on commit b617eda

Please sign in to comment.