This commit is contained in:
seb
2026-10-10 02:14:03 +02:00
parent 906ebafbbe
commit cf1c8d1126
11 changed files with 12 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ export default function addImage(provider) {
const addBrandPicSql = isSqlite ? SQLITE_ADD_BRANDPIC : MSSQL_ADD_BRANDPIC;
/**
* Adds an image to a brand, processing full, thumb, and 40px-edge small-thumb AVIF variants.
* Adds an image to a brand, processing full, thumb, and 32px-edge small-thumb AVIF variants.
*
* @param {number} googleAuthId - The id of the Google auth user.
* @param {number} brandId - The id of the brand.

View File

@@ -46,7 +46,7 @@ export default function list(provider) {
* @param {object} [opts] - Optional pagination options.
* @param {number} [opts.offset=0] - Number of brands to skip.
* @param {number} [opts.limit=10] - Number of brands to return (max 100).
* @param {boolean} [opts.includeSmallThumbs=false] - Include 40px-edge small thumbnail dimensions and base64 AVIF data.
* @param {boolean} [opts.includeSmallThumbs=false] - Include 32px-edge small thumbnail dimensions and base64 AVIF data.
* @param {object} [tx] - Optional transaction to run within.
* @returns {Promise<{brands: Array<{id: number, name: string, gsprpinfo: string|null, pics: Array<{fullHash: string, thumbW: number, thumbH: number, thumbHash: string, smallThumbW?: number|null, smallThumbH?: number|null, smallThumbBinary?: string|null}>}>, total: number, offset: number, limit: number}>} The brands plus the total unpaged count. Small-thumbnail fields are present only when `includeSmallThumbs` is true; the binary is base64-encoded AVIF data.
*