Skip to content

Commit

Permalink
fix: rename param to celebrityId
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-formula-monks committed Jun 14, 2024
1 parent 3c30797 commit 55d98e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ export async function updateVoteController(
]);

const { vote } = body;
const { id } = params;
const { celebrityId } = params;

const increment: Record<string, Record<string, number>> = {
positive: { 'votes.positive': 1 },
negative: { 'votes.negative': 1 },
};

const result = await updateCelebrityByIdCollection(id, {
const result = await updateCelebrityByIdCollection(celebrityId, {
$inc: increment[vote],
});

Expand Down

0 comments on commit 55d98e9

Please sign in to comment.