Skip to content

Commit

Permalink
fix count sql query to use index
Browse files Browse the repository at this point in the history
  • Loading branch information
dpevunov-cp committed Dec 5, 2024
1 parent 041aed5 commit 0d3b6a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/queries/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const total = async (match: Match<Link>, params: TotalParams = {}) => {
);
}

const [{ count }] = await query.count("id");
const [{ count }] = await query.count("*");

return typeof count === "number" ? count : parseInt(count);
};
Expand Down

0 comments on commit 0d3b6a0

Please sign in to comment.