u
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sql from 'mssql';
|
||||
import { getActiveShopId } from '../shop.js';
|
||||
|
||||
export const CATEGORY_TREE_CTE = `
|
||||
WITH CategoryTree AS (
|
||||
@@ -14,5 +15,8 @@ export function getRootCategoryId() {
|
||||
}
|
||||
|
||||
export function categoryTreeRequest(pool, rootCategoryId = getRootCategoryId()) {
|
||||
return pool.request().input('rootCategoryId', sql.Int, rootCategoryId);
|
||||
return pool
|
||||
.request()
|
||||
.input('rootCategoryId', sql.Int, rootCategoryId)
|
||||
.input('kShop', sql.Int, getActiveShopId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user