Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/backend/services/tag.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const getTag = async (
_input: z.infer<typeof TagRepositoryInput.getTag>
) => {
try {
const input = await TagRepositoryInput.createInput.parseAsync(_input);
const input = await TagRepositoryInput.getTag.parseAsync(_input);
const response = await persistenceRepository.tags.find({
where: eq("name", input.name),
});
Expand All @@ -39,7 +39,7 @@ export const getTag = async (
success: true as const,
};
} catch (error) {
handleActionException(error);
return handleActionException(error);
}
};

Expand All @@ -58,7 +58,7 @@ export const createTag = async (

return response.rows[0];
} catch (error) {
handleActionException(error);
return handleActionException(error);
}
};

Expand Down Expand Up @@ -101,13 +101,7 @@ export const syncTagsWithArticles = async (
inArray("tag_id", tagsToRemove)
),
});
console.log({
tagsToRemove,
tagsToAdd,
attachedTagIds,
inputTagIds: input.tag_ids,
});
} catch (error) {
handleActionException(error);
return handleActionException(error);
}
};