u
This commit is contained in:
@@ -2,6 +2,7 @@ import { GET_CATEGORY_ID_BY_SKU } from '../../sql/article.js';
|
||||
import { ADD as ADD_ARTICLEPIC, GET_NEXT_SORT } from '../../sql/articlepic.js';
|
||||
import { CREATE as CREATE_PIC } from '../../sql/pic.js';
|
||||
import processAvifImage from '../../util/processAvifImage.js';
|
||||
import newFullHash from '../../util/newFullHash.js';
|
||||
import resolveCategoryAccess from '../category/resolveCategoryAccess.js';
|
||||
import request from '../request.js';
|
||||
|
||||
@@ -32,12 +33,13 @@ export default function addImage(pool) {
|
||||
.query(GET_NEXT_SORT);
|
||||
|
||||
const sort = sortResult.recordset[0].sort;
|
||||
const fullHash = newFullHash();
|
||||
|
||||
const picResult = await request(pool, tx)
|
||||
.input('w', processed.full.w)
|
||||
.input('h', processed.full.h)
|
||||
.input('size', processed.full.size)
|
||||
.input('hash', processed.full.hash)
|
||||
.input('hash', fullHash)
|
||||
.input('thumbw', processed.thumb.w)
|
||||
.input('thumbh', processed.thumb.h)
|
||||
.input('thumbhash', processed.thumb.hash)
|
||||
@@ -68,7 +70,7 @@ export default function addImage(pool) {
|
||||
w: processed.thumb.w,
|
||||
h: processed.thumb.h,
|
||||
},
|
||||
fullHash: processed.full.hash,
|
||||
fullHash,
|
||||
thumbHash: processed.thumb.hash,
|
||||
};
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user