Skip to content

Commit

Permalink
Merge pull request #126 from boostcampwm2023/fix-116-shap-404-not-fou…
Browse files Browse the repository at this point in the history
…nd-error-handling

[Hotfix] 태그 찾을 때 비동기 처리로 인해 태그 생성 실패
  • Loading branch information
mingxoxo authored Nov 23, 2023
2 parents caad4c3 + e435f31 commit cb68077
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BE/src/diaries/diaries.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export class DiariesService {
return await Promise.all(
tagNames.map(async (tagName) => {
try {
return this.tagsRepository.getTagByName(tagName);
const tag = await this.tagsRepository.getTagByName(tagName);
return tag;
} catch {
return await this.tagsRepository.createTag(tagName);
}
Expand Down
1 change: 0 additions & 1 deletion BE/src/tags/tags.repository.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Diary } from "src/diaries/diaries.entity";
import { Tag } from "./tags.entity";
import { NotFoundException } from "@nestjs/common";

Expand Down

0 comments on commit cb68077

Please sign in to comment.