This commit is contained in:
seb
2026-10-11 18:55:08 +02:00
parent 7f4092971d
commit 17cb4f4c72
11 changed files with 110 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ export default function listByAttributeId(provider) {
* @param {number} googleAuthId - The id of the Google auth user.
* @param {number} attributeId - The attribute id.
* @param {object} [tx] - Optional transaction.
* @returns {Promise<Array<{id: number, attributeId: number, value: string, sort: number}>>}
* @returns {Promise<Array<{id: number, attributeId: number, value: string, sort: number, articleCount: number}>>}
*/
return async (googleAuthId, attributeId, tx) => {
if (!attributeId || !Number.isInteger(Number(attributeId))) {
@@ -29,6 +29,7 @@ export default function listByAttributeId(provider) {
attributeId: row.attributeId,
value: row.value,
sort: row.sort,
articleCount: Number(row.articleCount ?? 0),
}));
};
}