Skip to content

Commit

Permalink
fix: existing tag check
Browse files Browse the repository at this point in the history
  • Loading branch information
jjolton-contentful committed Oct 8, 2024
1 parent 217b504 commit c0ab006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/autotagger/functions/autotagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function fetchOpenAiResponse(
async function getExistingTags(cma: PlainClientAPI): Promise<string[]> {
try {
const tags = await cma.tag.getMany({});
return tags.items.map((tag) => tag.name);
return tags.items.map((tag) => tag.sys.id);
} catch (error) {
console.error('Error fetching existing tags from Contentful:', error);
throw error;
Expand Down

0 comments on commit c0ab006

Please sign in to comment.