u
This commit is contained in:
@@ -20,6 +20,9 @@ export default function addImage(provider) {
|
||||
const getSortSql = isSqlite ? SQLITE_GET_NEXT_SORT : MSSQL_GET_NEXT_SORT;
|
||||
const createPicSql = isSqlite ? SQLITE_CREATE_PIC : MSSQL_CREATE_PIC;
|
||||
const addCategoryPicSql = isSqlite ? SQLITE_ADD_CATEGORYPIC : MSSQL_ADD_CATEGORYPIC;
|
||||
const touchSql = isSqlite
|
||||
? "UPDATE category SET updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now') WHERE id = @categoryId"
|
||||
: 'UPDATE category SET updated_at = SYSUTCDATETIME() WHERE id = @categoryId';
|
||||
|
||||
/**
|
||||
* Adds an image to a category, processing full, thumb, and 32px-edge small-thumb AVIF variants.
|
||||
@@ -95,6 +98,8 @@ export default function addImage(provider) {
|
||||
});
|
||||
}
|
||||
|
||||
await runner.query(touchSql, { categoryId });
|
||||
|
||||
return {
|
||||
id: categoryId,
|
||||
fullHash,
|
||||
|
||||
Reference in New Issue
Block a user