Skip to content

Commit

Permalink
♻️ refactor: 생성된 태그를 배열로 변환하는 코드 효율적으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeVac513 committed Feb 13, 2025
1 parent 0734217 commit db0af23
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions feed-crawler/src/claude.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,8 @@ export class ClaudeService {

private async generateTag(feed: FeedDetail, tags: Record<string, number>) {
try {
const tagsArray = Object.entries(tags);
if (tagsArray.length === 0) return;

const tag = tagsArray.map(([key, value]) => {
return key;
});
const tag = Object.keys(tags);
if (tag.length === 0) return;
await this.tagMapRepository.insertTags(feed.id, tag);
feed.tag = tag;
} catch (error) {
Expand Down

0 comments on commit db0af23

Please sign in to comment.